| … | … | @@ -15,7 +15,7 @@ ADD_CXXTEST(SimplePersistUTest) |
| 15 | 15 | ADD_CXXTEST(SimpleFetchUTest) |
| 16 | 16 | TARGET_LINK_LIBRARIES(SimpleFetchUTest execution) |
| 17 | 17 | ADD_CXXTEST(SimpleBasicDeleteUTest) |
| 18 | # ADD_CXXTEST(SimpleDeleteUTest) | |
| 18 | ADD_CXXTEST(SimpleDeleteUTest) | |
| 19 | 19 | ADD_CXXTEST(SimpleAlphaEquivUTest) |
| 20 | 20 | ADD_CXXTEST(SimpleMultiPersistUTest) |
| 21 | 21 | ADD_CXXTEST(SimpleMultiUserUTest) |
| … | … | @@ -399,6 +399,9 @@ void DeleteUTest::delete_links(int idx, StorageNodePtr store) |
| 399 | 399 | store->remove_atom(_as, hl3[idx]); |
| 400 | 400 | store->remove_atom(_as, hl2[idx]); |
| 401 | 401 | store->remove_atom(_as, hl[idx]); |
| 402 | _as->extract_atom(hl3[idx]); | |
| 403 | _as->extract_atom(hl2[idx]); | |
| 404 | _as->extract_atom(hl[idx]); | |
| 402 | 405 | } |
| 403 | 406 | |
| 404 | 407 | // This removes all the links, and one node, from atomspace, |
| … | … | @@ -412,6 +415,7 @@ void DeleteUTest::extract_nodes(int idx, AtomSpacePtr as) |
| 412 | 415 | void DeleteUTest::delete_nodes(int idx, StorageNodePtr store) |
| 413 | 416 | { |
| 414 | 417 | store->remove_atom(_as, h3[idx], true); |
| 418 | _as->extract_atom(h3[idx], true); | |
| 415 | 419 | } |
| 416 | 420 | |
| 417 | 421 | // ============================================================ |
| … | … | @@ -14,7 +14,7 @@ ADD_CXXTEST(PersistUTest) |
| 14 | 14 | ADD_CXXTEST(FetchUTest) |
| 15 | 15 | TARGET_LINK_LIBRARIES(FetchUTest execution) |
| 16 | 16 | ADD_CXXTEST(BasicDeleteUTest) |
| 17 | # ADD_CXXTEST(DeleteUTest) | |
| 17 | ADD_CXXTEST(DeleteUTest) | |
| 18 | 18 | ADD_CXXTEST(AlphaEquivUTest) |
| 19 | 19 | ADD_CXXTEST(QueryPersistUTest) |
| 20 | 20 | ADD_CXXTEST(MultiPersistUTest) |
| … | … | @@ -131,7 +131,7 @@ void DeleteUTest::tearDown(void) |
| 131 | 131 | |
| 132 | 132 | void DeleteUTest::atomCompare(Handle a, AtomPtr b, std::string where) |
| 133 | 133 | { |
| 134 | printf("Check %s expect %s\n", where.c_str(), a->to_string().c_str()); | |
| 134 | logger().debug("Check %s expect %s", where.c_str(), a->to_string().c_str()); | |
| 135 | 135 | TSM_ASSERT("No atom found", b != nullptr); |
| 136 | 136 | |
| 137 | 137 | if (nullptr == b) return; |
| … | … | @@ -397,10 +397,13 @@ void DeleteUTest::extract_links(int idx, AtomSpacePtr as) |
| 397 | 397 | void DeleteUTest::delete_links(int idx, StorageNodePtr store) |
| 398 | 398 | { |
| 399 | 399 | store->remove_atom(_as, hl3[idx]); |
| 400 | _as->extract_atom(hl3[idx]); | |
| 400 | 401 | store->barrier(); |
| 401 | 402 | store->remove_atom(_as, hl2[idx]); |
| 403 | _as->extract_atom(hl2[idx]); | |
| 402 | 404 | store->barrier(); |
| 403 | 405 | store->remove_atom(_as, hl[idx]); |
| 406 | _as->extract_atom(hl[idx]); | |
| 404 | 407 | store->barrier(); |
| 405 | 408 | } |
| 406 | 409 | |
| … | … | @@ -415,6 +418,7 @@ void DeleteUTest::extract_nodes(int idx, AtomSpacePtr as) |
| 415 | 418 | void DeleteUTest::delete_nodes(int idx, StorageNodePtr store) |
| 416 | 419 | { |
| 417 | 420 | store->remove_atom(_as, h3[idx], true); |
| 421 | _as->extract_atom(h3[idx], true); | |
| 418 | 422 | store->barrier(); |
| 419 | 423 | } |
| 420 | 424 |