| … | … | @@ -27,6 +27,7 @@ using namespace opencog; |
| 27 | 27 | class AggregationUTest: public CxxTest::TestSuite |
| 28 | 28 | { |
| 29 | 29 | private: |
| 30 | AtomSpacePtr asp; | |
| 30 | 31 | AtomSpace* as; |
| 31 | 32 | SchemeEval* eval; |
| 32 | 33 | Aggregate* ag; |
| … | … | @@ -75,7 +76,8 @@ AggregationUTest::~AggregationUTest() |
| 75 | 76 | |
| 76 | 77 | void AggregationUTest::setUp() |
| 77 | 78 | { |
| 78 | as = new AtomSpace(); | |
| 79 | asp = createAtomSpace(); | |
| 80 | as = asp.get(); | |
| 79 | 81 | eval = new SchemeEval(as); |
| 80 | 82 | eval->eval("(add-to-load-path \"" PROJECT_SOURCE_DIR "\")"); |
| 81 | 83 | ag = new Aggregate(as); |
| … | … | @@ -85,7 +87,6 @@ void AggregationUTest::tearDown() |
| 85 | 87 | { |
| 86 | 88 | delete ag; |
| 87 | 89 | delete eval; |
| 88 | delete as; | |
| 89 | 90 | } |
| 90 | 91 | |
| 91 | 92 | void AggregationUTest::setup_dict() |
| … | … | @@ -100,7 +101,7 @@ void AggregationUTest::setup_dict() |
| 100 | 101 | |
| 101 | 102 | // The lexis to use |
| 102 | 103 | HandleSet lex; |
| 103 | as->get_handleset_by_type(lex, SECTION); | |
| 104 | as->get_handleset_by_type(std::inserter(lex, lex.end()), SECTION); | |
| 104 | 105 | dict->add_to_lexis(lex); |
| 105 | 106 | } |
| 106 | 107 |
| … | … | @@ -27,6 +27,7 @@ using namespace opencog; |
| 27 | 27 | class BasicNetworkUTest: public CxxTest::TestSuite |
| 28 | 28 | { |
| 29 | 29 | private: |
| 30 | AtomSpacePtr asp; | |
| 30 | 31 | AtomSpace* as; |
| 31 | 32 | SchemeEval* eval; |
| 32 | 33 | Aggregate* ag; |
| … | … | @@ -68,7 +69,8 @@ BasicNetworkUTest::~BasicNetworkUTest() |
| 68 | 69 | |
| 69 | 70 | void BasicNetworkUTest::setUp() |
| 70 | 71 | { |
| 71 | as = new AtomSpace(); | |
| 72 | asp = createAtomSpace(); | |
| 73 | as = asp.get(); | |
| 72 | 74 | eval = new SchemeEval(as); |
| 73 | 75 | eval->eval("(add-to-load-path \"" PROJECT_SOURCE_DIR "\")"); |
| 74 | 76 | ag = new Aggregate(as); |
| … | … | @@ -78,7 +80,6 @@ void BasicNetworkUTest::tearDown() |
| 78 | 80 | { |
| 79 | 81 | delete ag; |
| 80 | 82 | delete eval; |
| 81 | delete as; | |
| 82 | 83 | } |
| 83 | 84 | |
| 84 | 85 | void BasicNetworkUTest::setup_dict() |
| … | … | @@ -91,7 +92,7 @@ void BasicNetworkUTest::setup_dict() |
| 91 | 92 | |
| 92 | 93 | // The lexis to use XXX we should generate not read from file. |
| 93 | 94 | HandleSet lex; |
| 94 | as->get_handleset_by_type(lex, SECTION); | |
| 95 | as->get_handleset_by_type(std::inserter(lex, lex.end()), SECTION); | |
| 95 | 96 | dict->add_to_lexis(lex); |
| 96 | 97 | } |
| 97 | 98 |
| … | … | @@ -24,6 +24,7 @@ using namespace opencog; |
| 24 | 24 | class GraphUTest: public CxxTest::TestSuite |
| 25 | 25 | { |
| 26 | 26 | private: |
| 27 | AtomSpacePtr asp; | |
| 27 | 28 | AtomSpace* as; |
| 28 | 29 | SchemeEval* eval; |
| 29 | 30 | Aggregate* ag; |
| … | … | @@ -65,7 +66,8 @@ GraphUTest::~GraphUTest() |
| 65 | 66 | |
| 66 | 67 | void GraphUTest::setUp() |
| 67 | 68 | { |
| 68 | as = new AtomSpace(); | |
| 69 | asp = createAtomSpace(); | |
| 70 | as = asp.get(); | |
| 69 | 71 | eval = new SchemeEval(as); |
| 70 | 72 | eval->eval("(add-to-load-path \"" PROJECT_SOURCE_DIR "\")"); |
| 71 | 73 | ag = new Aggregate(as); |
| … | … | @@ -75,7 +77,6 @@ void GraphUTest::tearDown() |
| 75 | 77 | { |
| 76 | 78 | delete ag; |
| 77 | 79 | delete eval; |
| 78 | delete as; | |
| 79 | 80 | } |
| 80 | 81 | |
| 81 | 82 | void GraphUTest::setup_dict() |
| … | … | @@ -88,7 +89,7 @@ void GraphUTest::setup_dict() |
| 88 | 89 | |
| 89 | 90 | // The lexis to use XXX we should generate not read from file. |
| 90 | 91 | HandleSet lex; |
| 91 | as->get_handleset_by_type(lex, SECTION); | |
| 92 | as->get_handleset_by_type(std::inserter(lex, lex.end()), SECTION); | |
| 92 | 93 | dict->add_to_lexis(lex); |
| 93 | 94 | } |
| 94 | 95 |