mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[qfcc] Fix vector long tests
And the discovered typos (yes, I double-checked the values) in the PGA tests.
This commit is contained in:
parent
55b7547451
commit
717b09f33e
2 changed files with 11 additions and 8 deletions
|
@ -96,6 +96,9 @@ test_expr (expr_t *e)
|
||||||
break;
|
break;
|
||||||
case ev_long:
|
case ev_long:
|
||||||
case ev_ulong:
|
case ev_ulong:
|
||||||
|
if (type->width > 1) {
|
||||||
|
e = new_horizontal_expr ('|', e, &type_long);
|
||||||
|
}
|
||||||
e = new_alias_expr (&type_ivec2, e);
|
e = new_alias_expr (&type_ivec2, e);
|
||||||
return new_horizontal_expr ('|', e, &type_int);
|
return new_horizontal_expr ('|', e, &type_int);
|
||||||
case ev_ushort:
|
case ev_ushort:
|
||||||
|
|
|
@ -154,13 +154,13 @@ main (void)
|
||||||
// return 0;
|
// return 0;
|
||||||
// }
|
// }
|
||||||
auto o = vec ∧ vecb;
|
auto o = vec ∧ vecb;
|
||||||
if ((dvec3)o != '14 44 45'd) {
|
if ((dvec3)o != '14 44 46'd) {
|
||||||
printf ("vec ∧ vecb != '14 44 45': %lv\n", o);
|
printf ("vec ∧ vecb != '14 44 46': %lv\n", o);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
auto p = vecb ∧ vec;
|
auto p = vecb ∧ vec;
|
||||||
if ((dvec3)p != '-14 -44 -45'd) {
|
if ((dvec3)p != '-14 -44 -46'd) {
|
||||||
printf ("vecb ∧ vec != '-14 -44 -45': %lv\n", p);
|
printf ("vecb ∧ vec != '-14 -44 -46': %lv\n", p);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
auto q = vec • vecb;
|
auto q = vec • vecb;
|
||||||
|
@ -175,15 +175,15 @@ main (void)
|
||||||
}
|
}
|
||||||
evengrades_t s;
|
evengrades_t s;
|
||||||
s.mvec= vec * vecb;
|
s.mvec= vec * vecb;
|
||||||
if (s.scalar != -9 || (dvec3)s.bvec != '14 44 45'd) {
|
if (s.scalar != -9 || (dvec3)s.bvec != '14 44 46'd) {
|
||||||
printf ("vec * vecb != -9, '14 44 45': %g %lv\n",
|
printf ("vec * vecb != -9, '14 44 46': %g %lv\n",
|
||||||
s.scalar, s.bvec);
|
s.scalar, s.bvec);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
evengrades_t t;
|
evengrades_t t;
|
||||||
t.mvec = vecb * vec;
|
t.mvec = vecb * vec;
|
||||||
if (t.scalar != -9 || (dvec3)t.bvec != '-14 -44 -45'd) {
|
if (t.scalar != -9 || (dvec3)t.bvec != '-14 -44 -46'd) {
|
||||||
printf ("vecb * vec != -9, '-14 -44 -45': %g %lv\n",
|
printf ("vecb * vec != -9, '-14 -44 -46': %g %lv\n",
|
||||||
t.scalar, t.bvec);
|
t.scalar, t.bvec);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue