// Smoke test for the structured build DSL. Same task as example/c-sum // (sum of N integers) but described declaratively — no shell strings, // no per-platform `if /I "%CC%"=="msvc"` branching. The compiler is // selected via the JUDGE_CC env variable set by the CI matrix. toolchains { gcc { platforms = "linux" } clang { platforms = "linux" "windows" } msvc { platforms = "windows" } } build_defaults { language = "c" standard = "c11" sources = "solution.c" output = "solution" warnings = strict } build "release" { profile = release } build "debug" { profile = debug } build "sanitized" { profile = sanitized sanitize = "address" "undefined" platforms = "linux" compilers = "gcc" "clang" } build "debug-valgrind" { profile = debug wrapper = "valgrind --error-exitcode=99 --leak-check=full -q" platforms = "linux" compilers = "gcc" } timeout 5s normalize_crlf = true trim_trailing_ws = true group("basic") { weight = 0.5 test("one number") { stdin = "1\n42\n" stdout = "42\n" } test("three numbers") { stdin = "3\n1 2 3\n" stdout = "6\n" } test("negatives") { stdin = "4\n-1 -2 3 5\n" stdout = "5\n" } test("zero count") { stdin = "0\n" stdout = "0\n" } } group("edge") { weight = 0.5 test("large sum fits in int64") { stdin = "3\n2000000000 2000000000 2000000000\n" stdout = "6000000000\n" } test("multiline input") { stdin = "5\n10\n20\n30\n40\n50\n" stdout = "150\n" } }