Files
c3c/resources/tests/arithmetics.c3

38 lines
454 B
Plaintext

module arithmetics;
func void testAdd(int a, int b)
{
a = a + b;
a = a +% b;
a +%= b;
a += b;
a += 1;
a +%= 1;
}
func void testSub(int a, int b)
{
a = a - b;
a = a -% b;
a -%= b;
a -= b;
a -%= 1;
a -= 1;
}
func void testMult(int a, int b)
{
a = a * b;
a = a *% b;
a *%= b;
/*a *= b;
a *%= 1;
a *= 1;*/
}
func void testDiv(int a, int b)
{
a = a / b;
a /= b;
a /= 1;
}