Changeset 3f631d6 for tests


Ignore:
Timestamp:
Apr 10, 2025, 7:44:17 PM (8 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
570e7ad
Parents:
d175767
Message:

Switch string io to be generic upon iostream, rather than specific upon fstream.

No direct test added because we currently lack a second implementation of the abstract streams.

Benefit is removing polymorphism-induced noise from cost calculations, in upcoming string-overload reorganizations.

The change in tests 'collections/string-operator*' shows cases where we stopped picking string for the wrong reason. (If we should be picking string for a better reason, that's just ahead.)

Location:
tests
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    rd175767 r3f631d6  
    288288        -cp ${test} ${abspath ${@}}
    289289
     290collections/string-operator-ERR09 : collections/string-operator.cfa
     291        ${CFACOMPILE_SYNTAX} -DTRY_MR09
     292        -cp ${test} ${abspath ${@}}
     293
    290294collections/string-operator-ERR15 : collections/string-operator.cfa
    291295        ${CFACOMPILE_SYNTAX} -DTRY_MR15
  • tests/collections/.expect/string-operator.txt

    rd175767 r3f631d6  
    6565
    6666------------- Bare (sout-direct)
    67 ab
     67(skip)
    6868ab
    6969ab
     
    8585axb
    8686
    87 aaa
     87291
    8888bbb
    89 ÃÃÃ
     89585
    9090cdcdcd
    9191
    9292291
    9393bbb
    94 ababab
     94585
    9595cdcdcd
    9696
  • tests/collections/string-api-coverage.cfa

    rd175767 r3f631d6  
    1 #include <collections/string.hfa>
     1#include <string.hfa>
    22#include <string_sharectx.hfa>
     3#include <fstream.hfa>
    34
    45
  • tests/collections/string-ctx-manage.cfa

    rd175767 r3f631d6  
    22#include <string_sharectx.hfa>
    33#include <string_res.hfa>
     4#include <fstream.hfa>
    45
    56// In these tests, shared heaps are never remotely full and string sizes are tiny.
  • tests/collections/string-gc.cfa

    rd175767 r3f631d6  
    11#include <string_res.hfa>
     2#include <fstream.hfa>
    23
    34size_t bytesRemaining() {
  • tests/collections/string-istream-manip.cfa

    rd175767 r3f631d6  
    11
    22#include <fstream.hfa>
    3 #include <collections/string.hfa>
    4 #include <collections/string_res.hfa>
     3#include <string.hfa>
     4#include <string_res.hfa>
    55#include <stdio.h>
    66
  • tests/collections/string-istream.cfa

    rd175767 r3f631d6  
    1 #include <iostream.hfa>
    2 #include <collections/string.hfa>
    3 #include <collections/string_res.hfa>
     1#include <fstream.hfa>
     2#include <string.hfa>
     3#include <string_res.hfa>
    44
    55
  • tests/collections/string-operator.cfa

    rd175767 r3f631d6  
    99
    1010// These MR points do reject in the current revision, so they have satellite "-ERR" cases:
     11// MR09
    1112// MR15
    1213
     
    2021#define TRY_MR07
    2122#define TRY_MR08
    22 #define TRY_MR09
    2323#define TRY_MR10
    2424#define TRY_MR11
     
    275275        s = "x";
    276276
    277 MR09(   sout | 'a' + 'b';      )    // ab
     277MR09(   sout | 'a' + 'b';      )    // (ambiguous)
    278278        sout | 'a' + "b";           // ab
    279279        sout | "a" + 'b';           // ab
     
    299299        sout | nl;                  //
    300300
    301 MR11(   sout | 'a' * 3;          )  // aaa
     301MR11(   sout | 'a' * 3;          )  // 291
    302302        sout | "b" * 3;             // bbb
    303 MR12(   sout | ('a' + 'b') * 3;  )  // ÃÃÃ
     303MR12(   sout | ('a' + 'b') * 3;  )  // 585
    304304        sout | ('c' + "d") * 3;     // cdcdcd
    305305        sout | nl;                  //
     
    307307MR13(   sout | 3 * 'a';          )  // 291
    308308        sout | 3 * "b";             // bbb
    309 MR14(   sout | 3 * ('a' + 'b');  )  // ababab
     309MR14(   sout | 3 * ('a' + 'b');  )  // 585
    310310        sout | 3 * ('c' + "d");     // cdcdcd
    311311        sout | nl;                  //
  • tests/collections/string-overwrite.cfa

    rd175767 r3f631d6  
    1 #include <collections/string.hfa>
     1#include <string.hfa>
    22#include <string_sharectx.hfa>
     3#include <fstream.hfa>
    34
    45/*
Note: See TracChangeset for help on using the changeset viewer.