This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2020:cprog:projects:cnv0 [2020/03/27 12:40] – [Program] wedge | haas:spring2020:cprog:projects:cnv0 [2020/03/27 14:08] (current) – [Verification] wedge | ||
---|---|---|---|
Line 102: | Line 102: | ||
* argv[2]: lower-bound (where to start processing, inclusive of the lower bound value); this should be stored in an **unsigned short int** | * argv[2]: lower-bound (where to start processing, inclusive of the lower bound value); this should be stored in an **unsigned short int** | ||
* argv[3]: upper-bound (where to stop processing, inclusive of the upper bound value); this should be shored in an **unsigned short int** | * argv[3]: upper-bound (where to stop processing, inclusive of the upper bound value); this should be shored in an **unsigned short int** | ||
- | * immediately after the input, check to make sure the specified parameters are positive numbers: | + | * immediately after parameter processing, check to make sure the specified parameters are positive numbers. Any deviations should be displayed as error messages to STDERR: |
* N-ary value must be between 1 and 16 (inclusive of 1 and 16) | * N-ary value must be between 1 and 16 (inclusive of 1 and 16) | ||
- | * on error display " | + | * on error display "ERROR: |
* lower bound must be between 2 and 40000 (inclusive of 2 and 40000) | * lower bound must be between 2 and 40000 (inclusive of 2 and 40000) | ||
- | * on error display " | + | * on error display "ERROR: |
* upper bound must be between 2 and 65000 (inclusive of 2 and 65000) | * upper bound must be between 2 and 65000 (inclusive of 2 and 65000) | ||
- | * on error display " | + | * on error display "ERROR: |
- | * on situation of lower bound being greater than upper bound, display "lower bound is larger than upper bound", | + | * on situation of lower bound being greater than upper bound, display "ERROR: |
* proceed to evaluate the appropriate number range, determining whether or not it is an N-ary number of runtime specification | * proceed to evaluate the appropriate number range, determining whether or not it is an N-ary number of runtime specification | ||
* if it is, display the value to STDOUT in space-separated form (see execution section below for format) | * if it is, display the value to STDOUT in space-separated form (see execution section below for format) | ||
Line 166: | Line 166: | ||
<cli> | <cli> | ||
lab46: | lab46: | ||
- | [ 1] you have: err, should be: err [ 2] you have: no, should be: no | + | ERROR CHECK |
- | [ 3] you have: no, should be: | + | ================= |
- | [ 5] you have: no, should be: | + | invalid nary (0): ERROR: invalid nary value (0)! |
- | [ 7] you have: no, should be: | + | exit status: 1, should be: 1 |
- | [ 9] you have: yes, should be: yes [ 10] you have: yes, should be: yes | + | - - - - - - - |
- | [ 11] you have: no, should be: | + | invalid nary (17): ERROR: invalid nary value (17)! |
- | [ 13] you have: no, should be: | + | exit status: 1, should be: 1 |
- | [ 15] you have: yes, should be: yes [ 16] you have: no, should be: no | + | - - - - - - - |
- | [ 17] you have: no, should be: no [ 18] you have: no, should be: no | + | invalid lower (1): ERROR: invalid lower bound (1)! |
- | [ 19] you have: no, should be: no [ 20] you have: no, should be: no | + | exit status: 2, should be: 2 |
- | [ 21] you have: yes, should be: yes [ 22] you have: yes, should be: yes | + | - - - - - - - |
- | [ 23] you have: no, should be: no [ 24] you have: no, should be: no | + | invalid lower (43100): ERROR: invalid lower bound (43100)! |
- | [ 25] you have: yes, should be: yes [ 26] you have: yes, should be: yes | + | exit status: 2, should be: 2 |
- | [ 27] you have: yes, should be: yes [ 28] you have: no, should be: no | + | - - - - - - - |
- | [ 29] you have: no, should be: no [ 30] you have: no, should be: no | + | invalid upper (0): ERROR: invalid upper bound (0)! |
- | [ 31] you have: no, should be: no [ 32] you have: no, should be: no | + | exit status: 3, should be: 3 |
- | [ 33] you have: yes, should be: yes [ 34] you have: yes, should be: yes | + | - - - - - - - |
- | [ 35] you have: yes, should be: yes [ 36] you have: no, should be: no | + | invalid upper (65501): ERROR: invalid upper bound (65501)! |
+ | exit status: 3, should be: 3 | ||
+ | - - - - - - - | ||
+ | lower (300) bigger than upper (65): ERROR: lower bound (300) is larger than upper bound (65)! | ||
+ | exit status: 4, should be: 4 | ||
+ | - - - - - - - | ||
+ | Press ENTER to continue verification tests | ||
+ | nary( 1) | ||
+ | ======== | ||
+ | have: >23 29 31 < | ||
+ | need: >23 29 31 < | ||
+ | |||
+ | nary( 2) | ||
+ | ======== | ||
+ | have: >21 22 25 26 27 33 34 35 < | ||
+ | need: >21 22 25 26 27 33 34 35 < | ||
+ | |||
+ | nary( 3) | ||
+ | ======== | ||
+ | have: >20 28 32 < | ||
+ | need: > | ||
+ | |||
+ | nary( 4) | ||
+ | ======== | ||
+ | have: > | ||
+ | need: >24 30 < | ||
+ | |||
+ | nary( 5) | ||
+ | ======== | ||
+ | have: >36 < | ||
+ | need: >36 < | ||
lab46: | lab46: | ||
</ | </ |