Changeset 37ceccb for tests


Ignore:
Timestamp:
Oct 17, 2023, 12:12:00 PM (7 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
5e0bba5
Parents:
1b41219
Message:

Change string-read semantics so that reading nothing leaves the original value unmodified.

Logically revert #8cffa4f21, and apply the change onto work done since.

At cstring layer, libcfa change is a simplification, and test suite change is merely a different expectation.

At var-len-string layer, libcfa change is a patch to enable detecting the nothing-read case,
and test sute change (shows the different expectation but also) puts a similar patch into its "stop trying if nothing read" loop exits.

Location:
tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/collections/.expect/string-istream-manip.txt

    r1b41219 r37ceccb  
    696913 wwwwwwww
    707014 cccc
    71 15
     7115 q
    72721 yyyyyyyyyyyyyyyyyyyy
    73732 abcxxx
     
    848413 wwwwwwww
    858514 cccc
    86 15
     8615 q
  • tests/collections/string-istream-manip.cfa

    r1b41219 r37ceccb  
    3838        void echoTillX(const char * casename) {
    3939            string s;
    40             do {
     40            // loop assumes behaviour not tested until main-case #15:
     41            // on reading nothing, the prior string value is left alone
     42            do {
     43                s = "";
    4144                forceStringHeapFreeSpaceTo(9);
    4245                sin | s;
     
    5457            string s;
    5558            do {
     59                s = "";
    5660                sin | plainjane( s );
    5761                sout | casename | s;
     
    6872            string_res s;
    6973            do {
     74                s = "";
    7075                sin | plainjane( s );
    7176                sout | casename | s;
     
    8287            string s;
    8388            do {
     89                s = "";
    8490                sin | skip("-\n");
    8591                sin | incl( ".:|# x", s );
     
    97103            string s;
    98104            do {
     105                s = "";
    99106                sin | skip("-\n");
    100107                sin | excl( "-\n", s );
     
    113120            string s;
    114121            do {
     122                s = "";
    115123                sin | getline( s );
    116124                sout | casename | s;
     
    127135            string s;
    128136            do {
     137                s = "";
    129138                sin | getline( s, '@' );
    130139                sout | casename | s;
  • tests/io/.expect/manipulatorsInput.arm64.txt

    r1b41219 r37ceccb  
    343413 wwwwwwww
    353514 cccc
    36 15
     3615 q
    3737a
    3838a
  • tests/io/.expect/manipulatorsInput.x64.txt

    r1b41219 r37ceccb  
    343413 wwwwwwww
    353514 cccc
    36 15
     3615 q
    3737a
    3838a
  • tests/io/.expect/manipulatorsInput.x86.txt

    r1b41219 r37ceccb  
    343413 wwwwwwww
    353514 cccc
    36 15
     3615 q
    3737a
    3838a
Note: See TracChangeset for help on using the changeset viewer.