feat: stdlib daily APIs, macro tt/type paste, riscv64 cross smoke
ci / build (ubuntu) (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / build (ubuntu) (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
Sessions 83–87: grow Array/Map/String/Test ergonomics; delimiter-balanced and juxta :tt macros plus $t:type fragments; expression-level $(…),* in templates; selfhost slice lits; riscv64/aarch64 cross smoke helper and freestanding docs. Null-safe CBE type names and String_StartsWith.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
// Stdlib golden: String_IsEmpty / IsBlank / Repeat / ReplaceAll
|
||||
// Stdlib golden: String_IsEmpty / IsBlank / Repeat / ReplaceAll + Cmp/IndexOf/case
|
||||
import Std::Io::{PrintLine};
|
||||
import Std::String::{
|
||||
String_IsEmpty, String_IsBlank, String_Repeat, String_ReplaceAll,
|
||||
String_Eq, String_Len, String_Contains, String_StartsWith, String_EndsWith
|
||||
String_Eq, String_Len, String_Contains, String_StartsWith, String_EndsWith,
|
||||
String_Cmp, String_IndexOf, String_ToUpper, String_ToLower
|
||||
};
|
||||
import Std::Test::{
|
||||
Test_AssertTrue, Test_AssertFalse, Test_AssertEqInt, Test_AssertEqString, Test_Pass
|
||||
@@ -29,6 +30,13 @@ func Main() -> int {
|
||||
Test_AssertTrue(String_StartsWith("hello", "he"));
|
||||
Test_AssertTrue(String_EndsWith("hello", "lo"));
|
||||
|
||||
Test_AssertEqInt(String_Cmp("aa", "aa"), 0);
|
||||
Test_AssertTrue(String_Cmp("a", "b") < 0);
|
||||
Test_AssertEqInt(String_IndexOf("foo bar baz", "bar"), 4);
|
||||
Test_AssertEqInt(String_IndexOf("foo", "zz"), -1);
|
||||
Test_AssertEqString(String_ToUpper("AbC-12"), "ABC-12");
|
||||
Test_AssertEqString(String_ToLower("AbC-12"), "abc-12");
|
||||
|
||||
PrintLine("stdlib_string: ok");
|
||||
Test_Pass("stdlib_string");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user