mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Added stringify tests and $typefrom. Bump to 0.3.50.
This commit is contained in:
committed by
Christoffer Lerno
parent
62e3b8063e
commit
e7fad16d0f
20
test/test_suite/compile_time/stringify2.c3t
Normal file
20
test/test_suite/compile_time/stringify2.c3t
Normal file
@@ -0,0 +1,20 @@
|
||||
// #target: macos-x64
|
||||
module test;
|
||||
import std::io;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
var $s1 = $stringify(1 + 2);
|
||||
char[*] s2 = $stringify($s1);
|
||||
char[] s3 = $s1;
|
||||
|
||||
io::printfln("$s1 == %s", $s1);
|
||||
io::printfln("s2 == %s", &s2);
|
||||
io::printfln("s3 == %s", s3);
|
||||
}
|
||||
|
||||
/* #expect: test.ll
|
||||
|
||||
c"$s1\00", align 1
|
||||
c"1 + 2\00", align 1
|
||||
c"1 + 2\00", align 1
|
||||
Reference in New Issue
Block a user