Revision: 68969
          http://sourceforge.net/p/brlcad/code/68969
Author:   brlcad
Date:     2016-10-03 07:28:51 +0000 (Mon, 03 Oct 2016)
Log Message:
-----------
reorganize the booleanize tests a little bit for clarity.  add another arg 
indicating the expected output result.

Modified Paths:
--------------
    brlcad/trunk/src/libbu/tests/CMakeLists.txt

Modified: brlcad/trunk/src/libbu/tests/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/libbu/tests/CMakeLists.txt 2016-10-03 07:26:43 UTC (rev 
68968)
+++ brlcad/trunk/src/libbu/tests/CMakeLists.txt 2016-10-03 07:28:51 UTC (rev 
68969)
@@ -77,23 +77,28 @@
 #      bu_booleanize testing    #
 #################################
 BRLCAD_ADDEXEC(test_bu_booleanize bu_booleanize.c libbu NO_INSTALL)
-add_test(NAME bu_booleanize_null         COMMAND test_bu_booleanize) # tests 
NULL
-add_test(NAME bu_booleanize_empty        COMMAND test_bu_booleanize "")
-add_test(NAME bu_booleanize_n            COMMAND test_bu_booleanize "n")
-add_test(NAME bu_booleanize_nabcd        COMMAND test_bu_booleanize "nabcd")
-add_test(NAME bu_booleanize_N            COMMAND test_bu_booleanize "N")
-add_test(NAME bu_booleanize_Nabcd        COMMAND test_bu_booleanize "Nabcd")
-add_test(NAME bu_booleanize__sp__sp_abcd COMMAND test_bu_booleanize "  abcd")
-add_test(NAME bu_booleanize_0            COMMAND test_bu_booleanize "0")
-add_test(NAME bu_booleanize_0000         COMMAND test_bu_booleanize "0000")
-add_test(NAME bu_booleanize__lp_null_rp_ COMMAND test_bu_booleanize "(null)")
-add_test(NAME bu_booleanize_y            COMMAND test_bu_booleanize "y")
-add_test(NAME bu_booleanize_yabcd        COMMAND test_bu_booleanize "yabcd")
-add_test(NAME bu_booleanize_Y            COMMAND test_bu_booleanize "Y")
-add_test(NAME bu_booleanize_Yabcd        COMMAND test_bu_booleanize "Yabcd")
-add_test(NAME bu_booleanize_1            COMMAND test_bu_booleanize "1")
-add_test(NAME bu_booleanize_0001         COMMAND test_bu_booleanize "0001")
-add_test(NAME bu_booleanize_abcd         COMMAND test_bu_booleanize "abcd")
+# expected returns are false:0, strongly true:1, or anything else:>1
+add_test(NAME bu_booleanize_nullptr      COMMAND test_bu_booleanize) # tests 
NULL
+add_test(NAME bu_booleanize_nullstr      COMMAND test_bu_booleanize "(null)" 0)
+add_test(NAME bu_booleanize_empty        COMMAND test_bu_booleanize "" 0)
+add_test(NAME bu_booleanize_space        COMMAND test_bu_booleanize " " 0)
+add_test(NAME bu_booleanize_n            COMMAND test_bu_booleanize "n" 0)
+add_test(NAME bu_booleanize_nabcd        COMMAND test_bu_booleanize "nabcd" 2)
+add_test(NAME bu_booleanize_N            COMMAND test_bu_booleanize "N" 0)
+add_test(NAME bu_booleanize_Nabcd        COMMAND test_bu_booleanize "Nabcd" 2)
+add_test(NAME bu_booleanize__sp__sp_abcd COMMAND test_bu_booleanize "  abcd" 2)
+add_test(NAME bu_booleanize_y            COMMAND test_bu_booleanize "y" 1)
+add_test(NAME bu_booleanize_yabcd        COMMAND test_bu_booleanize "yabcd" 2)
+add_test(NAME bu_booleanize_Y            COMMAND test_bu_booleanize "Y" 1)
+add_test(NAME bu_booleanize_Yabcd        COMMAND test_bu_booleanize "Yabcd" 2)
+add_test(NAME bu_booleanize_abcd         COMMAND test_bu_booleanize "abcd" 2)
+add_test(NAME bu_booleanize_neg1         COMMAND test_bu_booleanize "-1" 2)
+add_test(NAME bu_booleanize_1            COMMAND test_bu_booleanize "1" 1)
+add_test(NAME bu_booleanize_2            COMMAND test_bu_booleanize "2" 2)
+add_test(NAME bu_booleanize_0            COMMAND test_bu_booleanize "0" 0)
+add_test(NAME bu_booleanize_neg0         COMMAND test_bu_booleanize "-0" 0)
+add_test(NAME bu_booleanize_0000         COMMAND test_bu_booleanize "0000" 0)
+add_test(NAME bu_booleanize_0001         COMMAND test_bu_booleanize "0001" 1)
 
 #
 #  ************ ctype.c tests *************

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to