Closed vext01 closed 1 month ago
This looks good but could we quickly add:
jit_ir::parser::test::all_jit_ir_syntax
well_formedness.rs
(i.e. should_panic
tests)Both well make it less likely we accidentally break things in the future :)
ah, sorry, wasn't aware of those tests. Yep, will add some.
I just realised that i accidentally re-used an old branch unintentionally! Never mind, it should be ok.
https://github.com/ykjit/yk/pull/1258/commits/33b8901951a78019c98cb95d76b1eee065d29102 adds tests (and strengthens some checks).
OK to squash.
Please squash.
squashed.
This is a strange error:
11:36:58 Running `target/debug/xtask cfmt --check`
11:36:58 ./tests/c/double.newcg.c:51:46: error: code should be clang-formatted [-Wclang-format-violations]
11:36:58 fprintf(stderr, "%d -> %f\n", i, (double) i);
11:36:58 ^
11:36:58
11:36:58 ./tests/c/float.newcg.c:53:45: error: code should be clang-formatted [-Wclang-format-violations]
11:36:58 fprintf(stderr, "%d -> %f\n", i, (float) i);
11:36:58 ^
11:36:58
I am unable to reproduce it, but also the error is really generic and doesn't actually say what the problem is.
Any ideas?
Sorry, I got it. I was on the wrong commit. It wants me to remove the space between the cast.
Force pushed the fix.
This gives us just enough floating point support to print a float value in a test.
We only support the common floating point types: float and double.
Requires https://github.com/ykjit/ykllvm/pull/175