cd /news/large-language-models/nice · home topics large-language-models article
[ARTICLE · art-10762] src=spader.zone ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

Nice

The article describes a test created by an AI language model (gpt-5.4-medium) for the author's CMake-based package manager, which uses file globbing to include source files. The test fixture includes two C files with functions returning 49 and 20, and a main file that checks if their sum equals 69, returning 0 for success or 1 for failure. The author notes the humor in the AI's choice of numbers, resulting in a "nice" test that verifies proper globbing and linking.

read1 min views25 publishedMar 25, 2026

I asked my good friend gpt-5.4-medium to write a little test for my CMake destroyer of a package manager. It was one step beyond cut-n-paste, and the machine politely obliged me. Test passed. Story’s over. Wait, no! We must look at the code produced by the machines, for it is often fraught with the wringing of many hands. And this one confused me; I added globs, so you can do src/*.c , for example. The fixture it created had two C files in child directories, and then included them in the target by glob. We do this all the time; write main.c such that it fails to compile if, say, the build system fails to append an include directory, or to link a library. It did the same thing here; each file had a function that was called in main . No glob, no source, linker complains, test fails. Looks good. Except these were the functions:

int post() {
return 49;
}
int pre() {
return 20;
}

Hmm? 49 ? 20 ? Surely there’s a simpler way. Hell, the functions don’t even need bodies. What the hell is it doing with these numbers? Well, there’s only one other file in the fixture, main.c :

int pre();
int post();
int main(int num_args, const char** args) {
return pre() + post() == 69 ? 0 : 1;
}

Ah. Nice.

── more in #large-language-models 4 stories · sorted by recency
── more on @gpt-5.4-medium 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/nice] indexed:0 read:1min 2026-03-25 ·