ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ag...@apache.org
Subject [16/50] [abbrv] ignite git commit: Fix for C++ tests
Date Fri, 14 Apr 2017 15:13:33 GMT
Fix for C++ tests


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/faaf92d6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/faaf92d6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/faaf92d6

Branch: refs/heads/ignite-4587
Commit: faaf92d65614daa65d6f6cbff9fe08cea31c6d4e
Parents: 0242728
Author: Igor Sapego <isapego@gridgain.com>
Authored: Thu Apr 13 20:08:05 2017 +0300
Committer: Igor Sapego <isapego@gridgain.com>
Committed: Thu Apr 13 20:08:05 2017 +0300

----------------------------------------------------------------------
 .../platforms/cpp/core-test/src/cache_test.cpp  | 58 ++++++++++----------
 1 file changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/faaf92d6/modules/platforms/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_test.cpp b/modules/platforms/cpp/core-test/src/cache_test.cpp
index d222009..ab29797 100644
--- a/modules/platforms/cpp/core-test/src/cache_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_test.cpp
@@ -123,15 +123,15 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeys)
     cache.Put(2, 2);
     cache.Put(3, 3);
 
-    int size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    int size = cache.Size(cache::IGNITE_PEEK_MODE_ONHEAP);
 
-    BOOST_REQUIRE(3 == size);
+    BOOST_CHECK_EQUAL(3, size);
 
     cache.RemoveAll();
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+    size = cache.Size(cache::IGNITE_PEEK_MODE_ONHEAP);
 
-    BOOST_REQUIRE(0 == size);
+    BOOST_CHECK_EQUAL(0, size);
 
     cache.Put(1, 1);
     cache.Put(2, 2);
@@ -143,18 +143,18 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeys)
 
     cache.RemoveAll(keySet);
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    size = cache.Size(cache::IGNITE_PEEK_MODE_ONHEAP);
 
-    BOOST_REQUIRE(1 == size);
+    BOOST_CHECK_EQUAL(1, size);
 }
 
 BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterVector)
 {
     cache::Cache<int, int> cache = Cache();
 
-    int size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+    int size = cache.Size(cache::IGNITE_PEEK_MODE_ONHEAP);
 
-    BOOST_REQUIRE(0 == size);
+    BOOST_CHECK_EQUAL(0, size);
 
     cache.Put(1, 1);
     cache.Put(2, 2);
@@ -166,18 +166,18 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterVector)
 
     cache.RemoveAll(keySet.begin(), keySet.end());
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    size = cache.Size(cache::IGNITE_PEEK_MODE_ONHEAP);
 
-    BOOST_REQUIRE(1 == size);
+    BOOST_CHECK_EQUAL(1, size);
 }
 
 BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterArray)
 {
     cache::Cache<int, int> cache = Cache();
 
-    int size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+    int size = cache.Size(cache::IGNITE_PEEK_MODE_ONHEAP);
 
-    BOOST_REQUIRE(0 == size);
+    BOOST_CHECK_EQUAL(0, size);
 
     cache.Put(1, 1);
     cache.Put(2, 2);
@@ -187,9 +187,9 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterArray)
 
     cache.RemoveAll(keys, keys + 4);
 
-    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+    size = cache.Size(cache::IGNITE_PEEK_MODE_ONHEAP);
 
-    BOOST_REQUIRE(1 == size);
+    BOOST_CHECK_EQUAL(1, size);
 }
 
 BOOST_AUTO_TEST_CASE(TestPut)
@@ -459,11 +459,11 @@ BOOST_AUTO_TEST_CASE(TestLocalClear)
 
     cache.Put(0, 2);
 
-    BOOST_REQUIRE(2 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(2 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
 
     cache.LocalClear(0);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalClearAll)
@@ -477,13 +477,13 @@ BOOST_AUTO_TEST_CASE(TestLocalClearAll)
 
     std::set<int> keySet(keys, keys + 2);
 
-    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ALL));
 
     cache.LocalClearAll(keySet);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ALL));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalClearAllIterList)
@@ -497,13 +497,13 @@ BOOST_AUTO_TEST_CASE(TestLocalClearAllIterList)
 
     std::list<int> keySet(keys, keys + 2);
 
-    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ALL));
 
     cache.LocalClearAll(keySet.begin(), keySet.end());
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ALL));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalClearAllIterArray)
@@ -515,13 +515,13 @@ BOOST_AUTO_TEST_CASE(TestLocalClearAllIterArray)
 
     int keys[] = { 0, 1 };
 
-    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ALL));
 
     cache.LocalClearAll(keys, keys + 2);
 
-    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
-    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_ALL));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ALL));
 }
 
 BOOST_AUTO_TEST_CASE(TestSizes)
@@ -535,7 +535,7 @@ BOOST_AUTO_TEST_CASE(TestSizes)
 
     BOOST_REQUIRE(2 <= cache.Size());
 
-    BOOST_REQUIRE(1 <= cache.LocalSize(cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(1 <= cache.LocalSize(cache::IGNITE_PEEK_MODE_ALL));
 }
 
 BOOST_AUTO_TEST_CASE(TestLocalEvict)


Mime
View raw message