diff options
author | Josh Blum | 2013-07-09 23:38:50 -0700 |
---|---|---|
committer | Josh Blum | 2013-07-09 23:38:50 -0700 |
commit | c1f3f2df1d859937f26770d24fe464b150251251 (patch) | |
tree | 7179c280a73d46b413458c0cc0b70841fa9c9a0b /tests | |
parent | 8c3ccbe2445a86678d87d03f6626881a2fddc7d5 (diff) | |
download | sandhi-c1f3f2df1d859937f26770d24fe464b150251251.tar.gz sandhi-c1f3f2df1d859937f26770d24fe464b150251251.tar.bz2 sandhi-c1f3f2df1d859937f26770d24fe464b150251251.zip |
gras: rename props files to calls (for callable work)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/block_calls_test.cpp (renamed from tests/block_props_test.cpp) | 8 | ||||
-rw-r--r-- | tests/block_calls_test.py (renamed from tests/block_props_test.py) | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5024954..f74a6c7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,7 +16,7 @@ endif() set(test_sources callable_test.cpp chrono_time_test.cpp - block_props_test.cpp + block_calls_test.cpp factory_test.cpp serialize_tags_test.cpp ) @@ -48,7 +48,7 @@ GR_ADD_TEST(hier_block_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/hie GR_ADD_TEST(thread_pool_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/thread_pool_test.py) GR_ADD_TEST(sbuffer_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/sbuffer_test.py) GR_ADD_TEST(query_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/query_test.py) -GR_ADD_TEST(block_props_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/block_props_test.py) +GR_ADD_TEST(block_calls_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/block_calls_test.py) GR_ADD_TEST(time_tags_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/time_tags_test.py) ######################################################################## diff --git a/tests/block_props_test.cpp b/tests/block_calls_test.cpp index b14677d..9f8a881 100644 --- a/tests/block_props_test.cpp +++ b/tests/block_calls_test.cpp @@ -31,7 +31,7 @@ struct MyBlock : gras::Block size_t foo; }; -BOOST_AUTO_TEST_CASE(test_property_set_get_with_return) +BOOST_AUTO_TEST_CASE(test_calls_get_set) { MyBlock my_block; BOOST_CHECK_EQUAL(my_block.foo, size_t(0)); @@ -43,13 +43,13 @@ BOOST_AUTO_TEST_CASE(test_property_set_get_with_return) BOOST_CHECK_EQUAL(my_foo, size_t(42)); } -BOOST_AUTO_TEST_CASE(test_property_errors) +BOOST_AUTO_TEST_CASE(test_callable_errors) { MyBlock my_block; - //property does not exist + //call does not exist BOOST_CHECK_THROW(my_block.x<size_t>("get_bar"), std::exception); - //wrong type for property + //wrong type for call BOOST_CHECK_THROW(my_block.x("set_foo", "a string"), std::exception); } diff --git a/tests/block_props_test.py b/tests/block_calls_test.py index 7f5dad2..c629421 100644 --- a/tests/block_props_test.py +++ b/tests/block_calls_test.py @@ -21,9 +21,9 @@ class MyBlock(gras.Block): new_foo + 0 #throws if its not a number self.foo = new_foo -class BlockPropsTest(unittest.TestCase): +class BlockCallsTest(unittest.TestCase): - def test_property_set_get(self): + def test_calls_get_set(self): my_block = MyBlock() self.assertEqual(my_block.foo, 0) @@ -33,16 +33,16 @@ class BlockPropsTest(unittest.TestCase): my_foo = my_block.get_foo() self.assertEqual(my_foo, 42) - def test_property_errors(self): + def test_calls_errors(self): my_block = MyBlock() - #property does not exist + #call does not exist threw = False try: my_block.get_bar() except: threw = True self.assertTrue(threw) - #wrong type for property + #wrong type for call threw = False try: my_block.set_foo(None) except: threw = True |