diff options
| author | _ov4 <ov4@ov4.one> | 2026-10-16 20:53:55 +0800 |
|---|---|---|
| committer | _ov4 <ov4@ov4.one> | 2026-10-16 20:53:55 +0800 |
| commit | d19f9ddb866ac2415cbfe66966897a8efe8ddb63 (patch) | |
| tree | 6be1a9a6e316e776a396813f7cb22c688287b21a /tests/ii/strings/program.cps | |
| parent | 5c00b8cd03cbfc516cce92229f3f4974d7549c24 (diff) | |
test(compiler): add seeded C++ differential tests across seven groups
Generate 10000 random records per group plus boundary inputs using a
portable SHA-256 stream. Compare native and runner output independently.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'tests/ii/strings/program.cps')
| -rw-r--r-- | tests/ii/strings/program.cps | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ii/strings/program.cps b/tests/ii/strings/program.cps new file mode 100644 index 0000000..55e7541 --- /dev/null +++ b/tests/ii/strings/program.cps @@ -0,0 +1,17 @@ +DECLARE Count : INTEGER +DECLARE Index : INTEGER +DECLARE Empty : INTEGER +DECLARE Text : STRING +DECLARE Start : INTEGER +DECLARE Width : INTEGER +INPUT Count +FOR Index <- 1 TO Count + INPUT Empty + INPUT Text + INPUT Start + INPUT Width + IF Empty = 1 THEN + Text <- "" + ENDIF + OUTPUT LENGTH(Text), ":", MID(Text, Start, Width), ":", RIGHT(Text, Width), ":", Text = ("" & Text), ":", LCASE(Text), ":", UCASE(Text) +NEXT Index |
