3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Just Standard Profile Kernel
6 * Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
9 * 上記著作権者は,以下の (1)〜(4) の条件か,Free Software Foundation
10 * によって公表されている GNU General Public License の Version 2 に記
11 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
12 * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下,
14 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
15 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
17 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
18 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
19 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
21 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
22 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
24 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
25 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
26 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
28 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
29 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
31 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
32 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
33 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
34 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
36 * @(#) $Id: collection.cpp,v 1.1 2009/01/31 05:27:37 suikan Exp $
39 // $Header: /cvsroot/toppersjsp4bf/jsp/cfg/base/collection.cpp,v 1.1 2009/01/31 05:27:37 suikan Exp $
41 #include "base/collection.h"
47 Collection::Collection(void) throw()
51 Collection::~Collection(void) throw()
58 //インスタンスをコレクションに追加 (順序は登録順)
59 bool Collection::addInstance(Collectable * _instance, bool _destruction) throw()
63 if(isValid() && _instance != 0) {
65 // 同じインスタンスを2回登録しないようにする
66 list<Element>::iterator scope;
68 scope = container.begin();
69 while(scope != container.end()) {
70 if(scope->instance == _instance)
75 if(scope == container.end()) {
77 struct Element element;
78 element.instance = _instance;
79 element.destruction = _destruction;
80 container.push_back(element);
84 scope->destruction = _destruction;
93 //指定されたCollectableインスタンスに相当する場所を指すイテレータの取得 (getInstance)
94 list<Collection::Element>::const_iterator Collection::_findInstance(const Collectable * predecessor) const throw()
96 list<Element>::const_iterator result;
98 result = container.begin();
100 //predecessorが指定されていた場合は探す
101 if(predecessor != 0) {
102 while(result != container.end()) {
103 if(result->instance == predecessor) {
104 ++ result; //検索はpredecessorの次から
115 Collectable * Collection::getInstance(const type_info & type, const Collectable * predecessor) const throw()
117 Collectable * result;
122 list<Element>::const_iterator scope;
125 scope = _findInstance(predecessor);
127 // 指定された型を持つ次のインスタンスを探す
128 while(scope != container.end()) {
129 if(typeid(*scope->instance) == type) {
130 result = scope->instance;
140 //コレクションからインスタンスを除外 (破棄はしない)
141 bool Collection::removeInstance(const Collectable * instance) throw()
145 if(isValid() && instance != 0) {
146 list<Element>::iterator scope;
148 scope = container.begin();
149 while(scope != container.end()) {
150 if(scope->instance == instance) {
152 container.erase(scope);
164 void Collection::clear(void)
167 list<Element>::iterator scope;
168 list<Element>::iterator next;
170 //破棄フラグがついているインスタンスを破棄
171 scope = container.begin();
172 while(scope != container.end()) {
174 next = scope; //ROT系はdeleteすると自分を消しにかかるので、イテレータを保存するために先に次を取得しておく
177 if(scope->destruction)
178 delete scope->instance;
187 /************************************************* テストスィート *************************************************/
190 #include "coverage_undefs.h"
192 class TestCollectable : public Collectable
195 class TestCollectable2 : public Collectable
196 { public: ~TestCollectable2(void) throw() { TestSuite::check("TestCollectable2::~TestCollectable2"); } };
199 class TestCollectable3 : public Collectable
200 { public: ~TestCollectable3(void) throw(int) { throw 0; } };
203 class TestCollectable4 : public TestCollectable2
204 { public: ~TestCollectable4(void) throw() { TestSuite::check("TestCollectable4::~TestCollectable4"); } };
206 TESTSUITE(main, Collection)
208 BEGIN_CASE("addInstance","addInstance") {
209 BEGIN_CASE("1","インスタンスは正しく登録できる") {
211 TestCollectable test;
212 TestCollectable2 test2;
214 BEGIN_CASE("1","登録できTRUEが返る (1個目)") {
215 if(!col.addInstance(&test, false))
219 BEGIN_CASE("2","登録できtrueが返る (2個目)") {
220 if(!col.addInstance(&test2, false))
224 BEGIN_CASE("3","個数が合ってる") {
225 if(col.container.size() != 2)
229 BEGIN_CASE("4","順番があってる") {
230 list<Element>::iterator scope;
231 scope = col.container.begin();
232 if(scope->instance != &test || scope->destruction != false)
235 if(scope->instance != &test2 || scope->destruction != false)
238 if(scope != col.container.end())
243 BEGIN_CASE("2","NULLインスタンスは登録されない") {
246 BEGIN_CASE("1","NULLインスタンスを渡すとfalseが返る") {
247 if(col.addInstance(0))
251 BEGIN_CASE("2","何も登録されていない") {
252 if(col.container.size() != 0)
257 BEGIN_CASE("3","無効なインスタンスに対する操作でfalseが返る") {
260 if(col.addInstance(0))
264 BEGIN_CASE("4","同一のインスタンスを2回登録しても1個だけしか登録されない") {
266 TestCollectable test;
268 TEST_CASE("0","[前提] 一回目は正しく成功する", col.addInstance(&test, false));
270 TEST_CASE("1","関数は正しく終了する", col.addInstance(&test, false));
271 TEST_CASE("2","インスタンス数は増えていない", col.container.size() == 1);
277 BEGIN_CASE("getInstance(type_info)","getInstance(type_info)") {
279 TestCollectable test;
280 TestCollectable test_2;
281 TestCollectable test_3;
282 TestCollectable2 test2;
283 TestCollectable2 test2_2;
284 TestCollectable2 test2_3;
286 col.addInstance(test);
287 col.addInstance(test2);
288 col.addInstance(test_2);
289 col.addInstance(test2_2);
290 col.addInstance(test_3);
291 col.addInstance(test2_3);
293 Collectable * instance = 0;
295 BEGIN_CASE("1","最初の要素を取得できる") {
296 instance = col.getInstance(typeid(TestCollectable));
297 if(instance != &test)
301 BEGIN_CASE("2","次の要素を取得できる") {
302 instance = col.getInstance(typeid(TestCollectable), instance);
303 if(instance != &test_2)
307 BEGIN_CASE("3","さらに次の要素を取得できる") {
308 instance = col.getInstance(typeid(TestCollectable), instance);
309 if(instance != &test_3)
313 BEGIN_CASE("4","そのまた次の要素を取得したらNULLが返る") {
314 instance = col.getInstance(typeid(TestCollectable), instance);
319 BEGIN_CASE("5","最初の要素を取得できる") {
320 instance = col.getInstance(typeid(TestCollectable2));
321 if(instance != &test2)
325 BEGIN_CASE("6","次の要素を取得できる") {
326 instance = col.getInstance(typeid(TestCollectable2), instance);
327 if(instance != &test2_2)
331 BEGIN_CASE("7","さらに次の要素を取得できる") {
332 instance = col.getInstance(typeid(TestCollectable2), instance);
333 if(instance != &test2_3)
337 BEGIN_CASE("8","そのまた次の要素を取得したらNULLが返る") {
338 instance = col.getInstance(typeid(TestCollectable), instance);
343 BEGIN_CASE("9","基底クラスではひっかからない") {
344 instance = col.getInstance(typeid(Collectable));
349 TEST_CASE("10","NULLに対して実行するとNULLが返る", ((Collection *)0)->getInstance(typeid(Collectable)) == 0);
352 BEGIN_CASE("getInstance<T>()","getInstance<T>()") {
354 TestCollectable test;
355 TestCollectable test_2;
356 TestCollectable test_3;
357 TestCollectable2 test2;
358 TestCollectable2 test2_2;
359 TestCollectable2 test2_3;
361 col.addInstance(test);
362 col.addInstance(test2);
363 col.addInstance(test_2);
364 col.addInstance(test2_2);
365 col.addInstance(test_3);
366 col.addInstance(test2_3);
368 Collectable * instance = 0;
370 BEGIN_CASE("1","最初の要素を取得できる") {
371 instance = col.getInstance<TestCollectable>();
372 if(instance != &test)
376 BEGIN_CASE("2","次の要素を取得できる") {
377 instance = col.getInstance<TestCollectable>(instance);
378 if(instance != &test_2)
382 BEGIN_CASE("3","さらに次の要素を取得できる") {
383 instance = col.getInstance<TestCollectable>(instance);
384 if(instance != &test_3)
388 BEGIN_CASE("4","そのまた次の要素を取得したらNULLが返る") {
389 instance = col.getInstance<TestCollectable>(instance);
394 BEGIN_CASE("5","最初の要素を取得できる") {
395 instance = col.getInstance<TestCollectable2>();
396 if(instance != &test2)
400 BEGIN_CASE("6","次の要素を取得できる") {
401 instance = col.getInstance<TestCollectable2>(instance);
402 if(instance != &test2_2)
406 BEGIN_CASE("7","さらに次の要素を取得できる") {
407 instance = col.getInstance<TestCollectable2>(instance);
408 if(instance != &test2_3)
412 BEGIN_CASE("8","そのまた次の要素を取得したらNULLが返る") {
413 instance = col.getInstance<TestCollectable2>(instance);
418 BEGIN_CASE("9","基底クラスで引っ掛ける その1") {
419 instance = col.getInstance<Collectable>();
420 if(instance != &test)
424 BEGIN_CASE("10","基底クラスで引っ掛ける その2") {
425 instance = col.getInstance<Collectable>(instance);
426 if(instance != &test2)
430 BEGIN_CASE("11","基底クラスで引っ掛ける その3") {
431 instance = col.getInstance<Collectable>(instance);
432 if(instance != &test_2)
436 BEGIN_CASE("12","基底クラスで引っ掛ける その4") {
437 instance = col.getInstance<Collectable>(instance);
438 if(instance != &test2_2)
442 BEGIN_CASE("13","基底クラスで引っ掛ける その5") {
443 instance = col.getInstance<Collectable>(instance);
444 if(instance != &test_3)
448 BEGIN_CASE("14","基底クラスで引っ掛ける その6") {
449 instance = col.getInstance<Collectable>(instance);
450 if(instance != &test2_3)
454 BEGIN_CASE("15","基底クラスで引っ掛ける その7") {
455 instance = col.getInstance<Collectable>(instance);
460 TEST_CASE("16","NULLに対して実行するとNULLが返る", ((Collection *)0)->getInstance<Collectable>() == 0);
464 BEGIN_CASE("removeInstance","removeInstance") {
466 BEGIN_CASE("1","正常に削除できる") {
468 TestCollectable test;
469 TestCollectable test2;
471 col.addInstance(test);
472 col.addInstance(test2);
474 BEGIN_CASE("1","存在する要素をremoveしたらtrue") {
475 if(!col.removeInstance(&test))
479 BEGIN_CASE("2","ちゃんと消えている") {
480 if(col.container.size() != 1 || col.container.begin()->instance != &test2)
485 BEGIN_CASE("2","NULLインスタンスに実行するとfalse") {
486 if(((Collection *)0)->removeInstance(0))
490 BEGIN_CASE("3","登録していないインスタンスを指定すると失敗する") {
492 TestCollectable test;
493 TestCollectable test2;
495 col.addInstance(test);
497 if(col.removeInstance(&test2))
501 BEGIN_CASE("4","NULLインスタンスを渡すと失敗する") {
503 TestCollectable test;
504 col.addInstance(test);
506 if(col.removeInstance(0))
511 BEGIN_CASE("clear","clear") {
512 BEGIN_CASE("1","実体を登録してclear") {
514 TestCollectable2 test2;
516 TestSuite::clearCheckpoints();
517 col.addInstance(test2);
520 BEGIN_CASE("1","要素がなくなっている") {
521 if(col.container.size() != 0)
525 TEST_CASE("2","test2は破棄されない", !TestSuite::isReached("TestCollectable2::~TestCollectable2"));
528 BEGIN_CASE("2","ポインタを登録してclear") {
530 TestCollectable2 * test2 = new TestCollectable2;
532 TestSuite::clearCheckpoints();
533 col.addInstance(test2);
536 BEGIN_CASE("1","要素がなくなっている") {
537 if(col.container.size() != 0)
541 TEST_CASE("2","test2は破棄される", TestSuite::isReached("TestCollectable2::~TestCollectable2"));
544 BEGIN_CASE("3","NULLオブジェクトに対して実行しても暴走しない") {
545 ((Collection *)0)->clear();
549 BEGIN_CASE("4","例外が出るようなデストラクタをもつインスタンスを破棄すると例外が漏れる") {
552 TestCollectable3 * test = new TestCollectable3;
554 col.addInstance(test);
569 BEGIN_CASE("destructor","destructor") {
570 BEGIN_CASE("1","実体を登録して破棄") {
571 Collection * col = new Collection;
572 TestCollectable2 test2;
574 TestSuite::clearCheckpoints();
575 col->addInstance(test2);
578 TEST_CASE("1","test2は破棄されない", !TestSuite::isReached("TestCollectable2::~TestCollectable2"));
581 BEGIN_CASE("2","ポインタを登録してclear") {
582 Collection * col = new Collection;
583 TestCollectable2 * test2 = new TestCollectable2;
585 TestSuite::clearCheckpoints();
586 col->addInstance(test2);
589 TEST_CASE("1","test2は破棄される", TestSuite::isReached("TestCollectable2::~TestCollectable2"));
593 BEGIN_CASE("3","例外が出るようなデストラクタを持つインスタンスを破棄しても例外が漏れない") {
594 Collection * col = new Collection;
595 TestCollectable3 * test2 = new TestCollectable3;
598 TestSuite::clearCheckpoints();
599 col->addInstance(test2);
614 BEGIN_CASE("deleteInstance","deleteInstance") {
615 BEGIN_CASE("1","インスタンスを削除できる") {
617 TestCollectable2 * test = new TestCollectable2;
619 TestSuite::clearCheckpoints();
620 col.addInstance(test);
622 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance<TestCollectable2>() != 0);
624 col.deleteInstance<TestCollectable2>();
625 TEST_CASE("1","インスタンスが消えている", col.getInstance<TestCollectable2>() == 0);
626 TEST_CASE("2","デストラクタが実行されている", TestSuite::isReached("TestCollectable2::~TestCollectable2"));
629 BEGIN_CASE("2","関係ないクラスを指定したら削除されない") {
631 TestCollectable2 * test = new TestCollectable2;
633 TestSuite::clearCheckpoints();
634 col.addInstance(test);
636 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance<TestCollectable2>() != 0);
638 col.deleteInstance<TestCollectable>();
639 TEST_CASE("1","インスタンスが消えていない", col.getInstance<TestCollectable2>() != 0);
640 TEST_CASE("2","デストラクタが実行されていない", !TestSuite::isReached("TestCollectable2::~TestCollectable2"));
644 BEGIN_CASE("3","同じクラスだけでなく派生先も消える") {
646 TestCollectable2 * test = new TestCollectable2;
647 TestCollectable4 * test2 = new TestCollectable4;
649 TestSuite::clearCheckpoints();
650 col.addInstance(test);
651 col.addInstance(test2);
653 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance(typeid(TestCollectable2)) != 0);
654 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance(typeid(TestCollectable4)) != 0);
656 col.deleteInstance<TestCollectable2>();
657 TEST_CASE("1","インスタンスがすべて消えている", col.getInstance<TestCollectable2>() == 0);
658 TEST_CASE("2","TestCollectable2のデストラクタが実行されている", TestSuite::isReached("TestCollectable2::~TestCollectable2"));
659 TEST_CASE("3","TestCollectable4のデストラクタが実行されている", TestSuite::isReached("TestCollectable4::~TestCollectable4"));
662 BEGIN_CASE("4","実体は破棄対象にならない") {
664 TestCollectable2 test;
666 TestSuite::clearCheckpoints();
667 col.addInstance(test);
669 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance<TestCollectable2>() != 0);
671 col.deleteInstance<TestCollectable2>();
672 TEST_CASE("1","インスタンスが消えている", col.getInstance<TestCollectable2>() == 0);
673 TEST_CASE("2","デストラクタが実行されていない", !TestSuite::isReached("TestCollectable2::~TestCollectable2"));
676 BEGIN_CASE("5","NULLオブジェクトに対して発行しても暴走しない") {
677 ((Collection *)0)->deleteInstance<TestCollectable>();
682 BEGIN_CASE("replaceInstance","replaceInstance") {
683 BEGIN_CASE("1","登録済みのインスタンスを入れ替える") {
685 TestCollectable2 test;
686 TestCollectable2 test2;
688 TestSuite::clearCheckpoints();
689 col.addInstance(test);
691 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance(typeid(TestCollectable2)) != 0);
693 TEST_CASE("1", "関数は成功する", col.replaceInstance<TestCollectable2>(test2));
694 TEST_CASE("2", "インスタンスは入れ替わっている", col.getInstance(typeid(TestCollectable2)) == &test2);
695 TEST_CASE("3", "test2以外にインスタンスはない", col.getInstance(typeid(TestCollectable2), &test2) == 0);
696 TEST_CASE("4", "デストラクタは実行されてない", !TestSuite::isReached("TestCollectable2::~TestCollectable2"));
699 BEGIN_CASE("2","登録済みのインスタンスを派生クラスのインスタンスで入れ替える") {
701 TestCollectable2 test;
702 TestCollectable4 test2;
704 TestSuite::clearCheckpoints();
705 col.addInstance(test);
707 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance(typeid(TestCollectable2)) != 0);
709 TEST_CASE("1", "関数は成功する", col.replaceInstance<TestCollectable2>(test2));
710 TEST_CASE("2", "インスタンスは入れ替わっている", col.getInstance<TestCollectable2>() == &test2);
711 TEST_CASE("3", "test2以外にインスタンスはない", col.getInstance(typeid(TestCollectable2)) == 0);
712 TEST_CASE("4", "デストラクタは実行されてない", !TestSuite::isReached("TestCollectable2::~TestCollectable2"));
715 BEGIN_CASE("3","無関係なクラスを指定して入れ替える") {
717 TestCollectable2 test;
718 TestCollectable4 test2;
720 TestSuite::clearCheckpoints();
721 col.addInstance(test);
723 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance(typeid(TestCollectable2)) != 0);
725 TEST_CASE("1", "関数は失敗する", !col.replaceInstance<TestCollectable>(test2));
726 TEST_CASE("2", "インスタンスは残っている", col.getInstance<TestCollectable2>() == &test);
729 BEGIN_CASE("4","登録済みのインスタンスを入れ替える (動的確保)") {
731 TestCollectable2 * test = new TestCollectable2;
732 TestCollectable2 test2;
734 TestSuite::clearCheckpoints();
735 col.addInstance(test);
737 TEST_CASE("0","[前提] ちゃんと登録されている", col.getInstance(typeid(TestCollectable2)) != 0);
739 TEST_CASE("1", "関数は成功する", col.replaceInstance<TestCollectable2>(test2));
740 TEST_CASE("2", "インスタンスは入れ替わっている", col.getInstance(typeid(TestCollectable2)) == &test2);
741 TEST_CASE("3", "test2以外にインスタンスはない", col.getInstance(typeid(TestCollectable2), &test2) == 0);
742 TEST_CASE("4", "デストラクタは実行されてる", TestSuite::isReached("TestCollectable2::~TestCollectable2"));
749 class TestRuntimeObject : public RuntimeObject
752 TestRuntimeObject(void) { CHECKPOINT("TestRuntimeObject::TestRuntimeObject"); }
753 ~TestRuntimeObject(void) { CHECKPOINT("TestRuntimeObject::~TestRuntimeObject"); }
756 class TestRuntimeObject2 : public RuntimeObject
759 TestRuntimeObject2(void) : RuntimeObject(true) { CHECKPOINT("TestRuntimeObject2::TestRuntimeObject2"); }
760 ~TestRuntimeObject2(void) { CHECKPOINT("TestRuntimeObject2::~TestRuntimeObject2"); }
763 TESTSUITE(main, RuntimeObjectTable)
765 Singleton<RuntimeObjectTable>::Context context;
766 Singleton<RuntimeObjectTable>::saveContext(context);
768 BEGIN_CASE("getInstance","getInstance") {
769 BEGIN_CASE("1","getInstanceは正しく機能する") {
770 Singleton<RuntimeObjectTable>::renewInstance();
771 TestCollectable test;
773 Singleton<RuntimeObjectTable>::getInstance()->addInstance(test);
775 BEGIN_CASE("1","getInstance(typeid)") {
776 if(RuntimeObjectTable::getInstance(typeid(TestCollectable)) != &test)
780 BEGIN_CASE("2","getInstance<T>()") {
781 if(RuntimeObjectTable::getInstance<TestCollectable>() != &test)
787 BEGIN_CASE("RuntimeObject","RuntimeObject") {
788 BEGIN_CASE("1","生成すると登録され、破棄で消滅する") {
789 TestRuntimeObject * ro;
791 TestSuite::clearCheckpoints();
793 TEST_CASE("0","[前提] 登録されていない", RuntimeObjectTable::getInstance<TestRuntimeObject>() == 0);
795 ro = new TestRuntimeObject;
797 TEST_CASE("1","コンストラクタが実行されている", TestSuite::isReached("TestRuntimeObject::TestRuntimeObject"));
798 TEST_CASE("2","登録されている", RuntimeObjectTable::getInstance<TestRuntimeObject>() == ro);
802 TEST_CASE("3","デストラクタが実行されている", TestSuite::isReached("TestRuntimeObject::~TestRuntimeObject"));
803 TEST_CASE("4","登録が解除されている", RuntimeObjectTable::getInstance<TestRuntimeObject>() == 0);
807 BEGIN_CASE("2","自動破棄のチェック") {
808 TestRuntimeObject * ro;
809 TestRuntimeObject2 * ro2;
811 TestSuite::clearCheckpoints();
813 TEST_CASE("0","[前提] 登録されていない", RuntimeObjectTable::getInstance<TestRuntimeObject>() == 0);
814 TEST_CASE("0","[前提] 登録されていない", RuntimeObjectTable::getInstance<TestRuntimeObject2>() == 0);
816 ro = new TestRuntimeObject;
817 ro2 = new TestRuntimeObject2;
819 TEST_CASE("1","コンストラクタが実行されている(ro)", TestSuite::isReached("TestRuntimeObject::TestRuntimeObject"));
820 TEST_CASE("2","コンストラクタが実行されている(ro2)", TestSuite::isReached("TestRuntimeObject2::TestRuntimeObject2"));
821 TEST_CASE("3","登録されている(ro)", RuntimeObjectTable::getInstance<TestRuntimeObject>() == ro);
822 TEST_CASE("4","登録されている(ro2)", RuntimeObjectTable::getInstance<TestRuntimeObject2>() == ro2);
824 Singleton<RuntimeObjectTable>::getInstance()->clear();
826 TEST_CASE("5","デストラクタは実行されていない (ro)", !TestSuite::isReached("TestRuntimeObject::~TestRuntimeObject"));
827 TEST_CASE("6","デストラクタは実行されている (ro2)", TestSuite::isReached("TestRuntimeObject2::~TestRuntimeObject2"));
828 TEST_CASE("7","登録が解除されている", RuntimeObjectTable::getInstance<TestRuntimeObject>() == 0);
829 TEST_CASE("8","登録が解除されている", RuntimeObjectTable::getInstance<TestRuntimeObject2>() == 0);
836 Singleton<RuntimeObjectTable>::restoreContext(context);