[brlcad-tracker] [ brlcad-Patches-3510515 ] Testing unit for /libbu/ Red-Black tree API
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: SourceForge.net <no...@so...> - 2012-08-22 05:22:45
|
Patches item #3510515, was opened at 2012-03-23 06:10 Message generated for change (Comment added) made by brlcad You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640804&aid=3510515&group_id=105292 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Analysis Group: Untested >Status: Open >Resolution: None Priority: 5 Private: No Submitted By: Andrei Popescu (popescuandrei) Assigned to: Sean Morrison (brlcad) Summary: Testing unit for /libbu/ Red-Black tree API Initial Comment: Uses a simple Tree creation with just one comparison function. It tests the following functions : bu_rb_insert () bu_rb_search () bu_rb_walk () rb_rot_right () bu_rb_diagnose_tree () bu_rb_create1 () Output for the option "1" , that meaning display the data from the tree. -------------------------------------------------------------------------------------------------------- SEARCH TEST: SEARCHING AN EXISTING VALUE: [PASSED] SEARCHING AN INEXISTANT VALUE: [PASSED] DELETE TEST: DELETING AN EXISTENT VALUE: SEARCHING THE SAME VALUE AFTER DELETION [FAILED] Should be NULL /RED-BLACK TREE WALKING TESTS : Input 1 to display the values walk or 0 for a moredetailed diagnosis display 1 PREORDER: Dep= 0 Val =h, Dep= 1 Val =e, Dep= 1 Val =l, Dep= 2 Val =l, Dep= 2 Val =o, PREORDER AFTER ROTATE RIGH: Dep= 0 Val =e, Dep= 1 Val =h, Dep= 2 Val =l, Dep= 3 Val =l, Dep= 3 Val =o, INORDER: Dep= 0 Val =e, Dep= 1 Val =h, Dep= 3 Val =l, Dep= 2 Val =l, Dep= 3 Val =o, POSTORDER Dep= 3 Val =l, Dep= 3 Val =o, Dep= 2 Val =l, Dep= 1 Val =h, Dep= 0 Val =e, -------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------- >Comment By: Sean Morrison (brlcad) Date: 2012-08-21 22:22 Message: This patch wasn't showing up in listings because the status and resolution were left unchanged as Pending/Rejected. Reviewing now... ---------------------------------------------------------------------- Comment By: Andrei Popescu (popescuandrei) Date: 2012-06-02 16:12 Message: Feedback has been applied, patch was resubmitted. ( 90% sure that the brackets/ space indent is fine now) ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2012-05-27 20:31 Message: Andrei, looking much better, but there are still several problems: 1) the style and whitespace are now consistent but still both wrong. indentation should be 4 space indents with tab stops every 8 characters. braces are wrong (we stylistically use kernel normal form). see HACKING for examples and more details. 2) the new file should be included in the diff, not be a separate file. as I noted, you can run svn add even without commit access and it'll get included in "svn diff" output. this point is certainly not major, but you should be familiar with that basic use case of svn since it's central to creating proper patch files for any project. 3) your test_rbtree.diff attachment that edits CMakeLists.txt erroneously eliminates the test_bitv unit test. if you read the file, you'll see that you removed a line that should not be removed. you can run "svn revert CMakeLists.txt" and redo your edit or manually add the line back so that the diff file only has your one-line addition. ---------------------------------------------------------------------- Comment By: Andrei Popescu (popescuandrei) Date: 2012-05-26 12:09 Message: The measures mentioned in the feedback were applied. ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2012-05-18 13:44 Message: Nice work, but there are several problems that must be corrected first. This unit test doesn't conform to our coding style; the format is actually all over the place. The submission also doesn't (and should) include modifications to add the unit test to our build systems and isn't in patch format. Also, the unit test should only return 0 if all tests are run and pass correctly Please reformat for our style as described in HACKING and see other source code files in libbu for examples of the style in practice. Correct the return codes and update the build system files (CMakeLists.txt and Makefile.am) to enable the test for compilation. Done from a svn checkout, you can run "svn add src/libbu/test_rbtree.c" to add your test file uncommitted, but that will then let you run "svn diff src/libbu > rbtest.patch" to obtain your changes in patch format. Ask questions if anything is unclear. ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2012-03-23 09:44 Message: Awesome. That would make you the first patch-submitter for this year's GSoC. Kudos on getting a head start! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640804&aid=3510515&group_id=105292 |