% analysis was incorrect for int vectors.

This commit is contained in:
Christoffer Lerno
2024-08-09 15:23:40 +02:00
parent 44db4a21fc
commit f3e5268083
3 changed files with 12 additions and 2 deletions

View File

@@ -1,5 +1,15 @@
import std::io;
fn void! test_int_mod() @test
{
int[<2>] y = { 10, 99 };
int[<2>] z = { 3, 5 };
assert(y % z == { 1, 4 });
assert(y / z == { 3, 19 });
assert(int[<2>]{ 10, 99 } % int[<2>]{ 3, 5 } == { 1, 4 });
assert(int[<2>]{ 10, 99 } / int[<2>]{ 3, 5 } == { 3, 19 });
}
fn void! test_conv() @test
{
float[<4>] y = { 1, 2, 3, 4 };