mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add $$select. "--fp-math" options. Fixed issue with accidentally silent error on failed vector conversions.
This commit is contained in:
committed by
Christoffer Lerno
parent
b894e5be69
commit
4ef74a1205
10
test/unit/regression/select.c3
Normal file
10
test/unit/regression/select.c3
Normal file
@@ -0,0 +1,10 @@
|
||||
import std;
|
||||
fn long[<4>] process(long[<4>] a, long[<4>] b) @noinline
|
||||
{
|
||||
return math::select({ true, true, false, true }, a, b);
|
||||
}
|
||||
fn void test_select() @test
|
||||
{
|
||||
long[<4>] res = process({ 4, 5, 6, 7 }, { 100, 200, 300, 400 });
|
||||
assert(res == { 4, 5, 300, 7});
|
||||
}
|
||||
Reference in New Issue
Block a user