User Tools

Site Tools


haas:spring2020:cprog:projects:cnv0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:spring2020:cprog:projects:cnv0 [2020/03/27 12:40] – [Program] wedgehaas: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 "invalid nary value" and terminate execution sending back a 1+      * on error display "ERROR: invalid nary value (#)!" and terminate execution sending back a 1 (the # should be the actual number in deviation)
     * 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 "invalid lower bound" and terminate execution sending back a 2+      * on error display "ERROR: invalid lower bound (#)!" and terminate execution sending back a 2 (the # should be the actual number in deviation)
     * 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 "invalid upper bound" and terminate execution sending back a 3 +      * on error display "ERROR: invalid upper bound (#)!" and terminate execution sending back a 3 (the # should be the actual number in deviation) 
-      * on situation of lower bound being greater than upper bound, display "lower bound is larger than upper bound", terminating execution and sending back a 4+      * on situation of lower bound being greater than upper bound, display "ERROR: lower bound (#) is larger than upper bound (#)!", terminating execution and sending back a 4 (the # should be the actual number in deviation)
   * 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:~/src/cprog/cnv0$ /var/public/spring2020/cprog/cnv0/cnv0verify lab46:~/src/cprog/cnv0$ /var/public/spring2020/cprog/cnv0/cnv0verify
-[  1] you haveerr, should beerr    [  2] you have no, should be:  no +ERROR CHECK 
-[  3] you have no, should be no    [  4] you haveyes, should be: yes +================= 
-[  5] you have no, should be no    [  6] you haveyes, should be: yes +invalid nary (0)ERRORinvalid nary value (0)! 
-[  7] you have no, should be no    [  8] you haveyes, should be: yes +     exit status1, should be: 
-[  9] you haveyes, should beyes    [ 10] you haveyes, should be: yes +- - - - - - - 
-[ 11] you have no, should be no    [ 12] you have no, should be:  no +invalid nary (17)ERRORinvalid nary value (17)! 
-[ 13] you have no, should be no    [ 14] you haveyes, should be: yes +     exit status1, should be: 1 
-[ 15] you have: yes, should beyes    [ 16] you have:  no, should be:  no +- - - - - - - 
-[ 17] you have:  no, should be:  no    [ 18] you have:  no, should be:  no +invalid lower (1)ERRORinvalid lower bound (1)! 
-[ 19] you have:  no, should be:  no    [ 20] you have:  no, should be:  no +     exit status2, 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)ERRORinvalid lower bound (43100)! 
-25] you have: yes, should be: yes    [ 26] you have: yes, should be: yes +     exit status2, should be: 
-[ 27] you haveyes, 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)ERRORinvalid upper bound (0)! 
-[ 31] you have no, should be:  no    [ 32] you have:  no, should be:  no +     exit status3, should be: 3 
-[ 33] you have: yes, should be: yes    [ 34] you have: yes, should be: yes +- - - - - - - 
-[ 35] you haveyes, should be: yes    [ 36] you have:  no, should be:  no+invalid upper (65501)ERRORinvalid upper bound (65501)! 
 +     exit status3, should be: 3 
 +- - - - - - - 
 +lower (300) bigger than upper (65)ERRORlower bound (300) is larger than upper bound (65)! 
 +     exit status4, should be: 
 +- - - - - - - 
 +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>20 28 32 < 
 + 
 +nary( 4) 
 +======== 
 +   have: >24 30 < 
 +   need>24 30 < 
 + 
 +nary( 5) 
 +======== 
 +   have: >36 < 
 +   need>36 
 lab46:~/src/cprog/cnv0$  lab46:~/src/cprog/cnv0$ 
 </cli> </cli>
haas/spring2020/cprog/projects/cnv0.1585312835.txt.gz · Last modified: 2020/03/27 12:40 by wedge