mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
c40f4194e9
Fixes t3 of vecexpr, but t2 is broken (lost first assignment).
37 lines
375 B
R
37 lines
375 B
R
#include "test-harness.h"
|
|
vector
|
|
t1()
|
|
{
|
|
return [1, 2, 3];
|
|
}
|
|
|
|
vector
|
|
t2(float x)
|
|
{
|
|
return [x, x, x];
|
|
}
|
|
|
|
vector
|
|
t3(float x)
|
|
{
|
|
return [x, t2(9).z, x] * 2;
|
|
}
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int ret = 0;
|
|
vector v;
|
|
|
|
v = t2(5);
|
|
if (v != [5, 5, 5]) {
|
|
printf("t2(5) = %v\n", v);
|
|
ret |= 1;
|
|
}
|
|
v = t3 (5);
|
|
if (v != [10, 18, 10]) {
|
|
printf("t3(5) = %v\n", v);
|
|
ret |= 1;
|
|
}
|
|
return ret;
|
|
}
|