test: expand golden C-codegen tests from 2 to 8 examples

Add golden tests for: structs, generics, algebraic_enums, enums,
methods, strings. Each test captures the expected C output from the
bootstrap compiler for regression detection.

Also remove leftover 'PARSER FIX V2 ACTIVE' debug print from parser.bux.
This commit is contained in:
2026-06-09 15:58:44 +03:00
parent 3ed5891de2
commit 265bda850d
20 changed files with 29235 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
[Package]
Name = "strings"
Version = "0.1.0"
Type = "bin"
[Build]
Output = "Bin"
File diff suppressed because it is too large Load Diff
+34
View File
@@ -0,0 +1,34 @@
// Strings - String manipulation with Std::String
import Std::Io::{PrintLine, PrintInt};
import Std::String::{String_Len, String_Eq, String_Concat};
func Main() -> int {
let hello: String = "Hello";
let world: String = "World";
PrintLine("String operations:");
// Length
PrintLine("Length of 'Hello':");
PrintInt(String_Len(hello));
PrintLine("");
// Concatenation
let greeting: String = String_Concat(hello, ", ");
let greeting2: String = String_Concat(greeting, world);
let full: String = String_Concat(greeting2, "!");
PrintLine("Concatenated:");
PrintLine(full);
// Equality
if String_Eq(hello, "Hello") {
PrintLine("'Hello' equals 'Hello'");
}
if !String_Eq(hello, world) {
PrintLine("'Hello' does not equal 'World'");
}
return 0;
}