Every // ---- section banner dies (132 -> 0): names carry the WHAT. Narration deleted (filename restatements, run-with lines, what-the- next-line-does); every ref/hare cite, task cite, divergence, ABI/ layout contract, and ownership qualifier kept (borrowed-view lines restored where the sweep over-cut). Comment-only proven: all 442 walk-workdir .s and 32 import-probe .s byte-identical before/after; libbyteid 56-roster all-ID.
17 lines
488 B
Plaintext
17 lines
488 B
Plaintext
// Vectors mirror ref/hare/strings/compare.ha (task #5 @test conversion).
|
|
|
|
package strings_test;
|
|
|
|
import strings;
|
|
|
|
// ref/hare/strings/compare.ha:16.
|
|
|
|
@test fn compare_cases() void = {
|
|
assert(!(strings.compare("ABC", "ABC") != 0));
|
|
assert(!(strings.compare("ABC", "AB") <= 0));
|
|
assert(!(strings.compare("AB", "ABC") >= 0));
|
|
assert(!(strings.compare("BCD", "ABC") <= 0));
|
|
assert(!(strings.compare("ABC", "abc") >= 0));
|
|
assert(!(strings.compare("ABC", "こんにちは") >= 0));
|
|
};
|