This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2015:data:projects:dls0 [2015/11/08 13:59] – [List Library unit tests] wedge | haas:fall2015:data:projects:dls0 [2015/11/16 15:55] (current) – [Errata] wedge | ||
---|---|---|---|
Line 11: | Line 11: | ||
This section will document any updates applied to the project since original release: | This section will document any updates applied to the project since original release: | ||
- | * __revision | + | * __revision |
+ | * on test 7, a copy of a populated stack, the unit test was incorrectly expecting " | ||
=====Objective===== | =====Objective===== | ||
Line 166: | Line 167: | ||
</ | </ | ||
- | __**Technical note**__: Due to space constraints, | + | __**Technical note**__: Due to space constraints |
Line 186: | Line 187: | ||
* **DLS_CREATE_FAIL** - memory allocation failed (considered in error) | * **DLS_CREATE_FAIL** - memory allocation failed (considered in error) | ||
* **DLS_NULL** - result is NULL (probably in error) | * **DLS_NULL** - result is NULL (probably in error) | ||
- | * **DLS_EMPTY** - result is an empty list (may or may not be in error) | + | * **DLS_EMPTY** - result is an empty list/ |
* **DLS_OVERFLOW** - operation exceeds allocated size of list (may be considered an error) | * **DLS_OVERFLOW** - operation exceeds allocated size of list (may be considered an error) | ||
* **DLS_UNDERFLOW** - operation cannot proceed due to lack of data (may be considered an error) | * **DLS_UNDERFLOW** - operation cannot proceed due to lack of data (may be considered an error) | ||
* **DLS_DEFAULT_FAIL** - default state of unimplemented functions (default error) | * **DLS_DEFAULT_FAIL** - default state of unimplemented functions (default error) | ||
- | * **DLS_FAIL** - some error occurred | + | * **DLS_ERROR** - some error occurred |
+ | * **DLS_INVALID** - invalid state (pointer to stack does not exist) | ||
For example, in the case of " | For example, in the case of " | ||
- | * DLS_FAIL | + | * DLS_ERROR |
* DLS_CREATE_FAIL (a problem has occurred when using malloc()) | * DLS_CREATE_FAIL (a problem has occurred when using malloc()) | ||
* DLS_NULL (no memory allocated, so stack cannot be anything but NULL) | * DLS_NULL (no memory allocated, so stack cannot be anything but NULL) | ||
- | ALL THREE states must be returned from the function in question should such an occurrence take place. | + | ALL THREE states must be returned from the function in question should such an occurrence take place (in addition, various underlying |
- | + | ||
- | It is also intended that when handling stack status codes, any list status codes will also be present | + | |
====Stack library unit tests==== | ====Stack library unit tests==== | ||
In **testing/ | In **testing/ | ||
Line 239: | Line 238: | ||
It is also highly recommended to undertake as it will give you further experience working with these concepts. | It is also highly recommended to undertake as it will give you further experience working with these concepts. | ||
- | Note this is a DIFFERENT approach than you would have taken in the program with sll2- you're to use stack functionality to aid you with the heavy lifting. | + | Note this is a DIFFERENT approach than you would have taken in the program with sll2 and dll1- you're to use stack functionality to aid you with the heavy lifting. |
=====Expected Results===== | =====Expected Results===== | ||
- | To assist you in verifying a correct implementation, | + | To assist you in verifying a correct implementation, |
- | + | ||
- | ====node library==== | + | |
- | Here is what you should get for node: | + | |
- | + | ||
- | < | + | |
- | lab46: | + | |
- | ==================================================== | + | |
- | = Verifying Doubly-Linked Node Functionality | + | |
- | ==================================================== | + | |
- | [mknode] Total: | + | |
- | [cpnode] Total: | + | |
- | [rmnode] Total: | + | |
- | ==================================================== | + | |
- | | + | |
- | ==================================================== | + | |
- | lab46: | + | |
- | </ | + | |
- | + | ||
- | As no coding changes were needed in the node library, these results | + | |
- | + | ||
- | ====list library==== | + | |
- | Here is what you should get for list: | + | |
- | + | ||
- | < | + | |
- | lab46: | + | |
- | ==================================================== | + | |
- | = Verifying Doubly-Linked List Functionality | + | |
- | ==================================================== | + | |
- | [mklist] Total: | + | |
- | [append] Total: | + | |
- | [insert] Total: | + | |
- | [obtain] Total: | + | |
- | | + | |
- | ==================================================== | + | |
- | | + | |
- | ==================================================== | + | |
- | lab46: | + | |
- | </ | + | |
- | + | ||
- | Due to the re-introduction of **qty** into list (impacting actions performed by **mklist()**, | + | |
- | + | ||
- | Remember though- aside from the minor change of adding **qty** and enhancing **display()**, | + | |
====stack library==== | ====stack library==== | ||
Line 290: | Line 247: | ||
<cli> | <cli> | ||
- | lab46: | + | lab46: |
- | =================================================== | + | ====================================================== |
- | = | + | = Verifying Doubly-Linked Stack Functionality |
- | =================================================== | + | ====================================================== |
- | [mkstack] Total: | + | |
- | [cpstack] Total: | + | [push] Total: |
- | [rmstack] Total: | + | |
- | [push] Total: | + | [cpstack] Total: |
- | [pop] Total: | + | [peek] Total: |
- | [peek] Total: | + | [isempty] Total: |
- | [isempty] Total: | + | |
- | =================================================== | + | ====================================================== |
- | [RESULTS] Total: | + | |
- | =================================================== | + | ====================================================== |
lab46: | lab46: | ||
</ | </ | ||
- | =====Submission | + | =====Submission===== |
- | To be successful in this project, the following criteria must be met: | + | {{page> |
- | * Project must be submit on time, by the posted deadline. | ||
- | * Late submissions will lose 25% credit per day, with the submission window closing on the 4th day following the deadline. | ||
- | * All code must compile cleanly (no warnings or errors) | ||
- | * all requested functions must be implemented in the related library | ||
- | * all requested functionality must conform to stated requirements (either on this project page or in comment banner in source code files themselves). | ||
- | * Executed programs must display in a manner similar to provided output | ||
- | * output formatted, where applicable, must match that of project requirements | ||
- | * Processing must be correct based on input given and output requested | ||
- | * Output, if applicable, must be correct based on values input | ||
- | * Code must be nicely and consistently indented (you may use the **indent** tool) | ||
- | * Code must be commented | ||
- | * Any "to be implemented" | ||
- | * these "to be implemented" | ||
- | * Sufficient comments explaining the point of provided logic **MUST** be present | ||
- | * Track/ | ||
- | * Submit a copy of your source code to me using the **submit** tool (**make submit** will do this) by the deadline. |