[qfcc] Fix vector long tests

And the discovered typos (yes, I double-checked the values) in the PGA
tests.
This commit is contained in:
Bill Currie 2023-08-27 17:50:11 +09:00
parent 55b7547451
commit 717b09f33e
2 changed files with 11 additions and 8 deletions

View file

@ -96,6 +96,9 @@ test_expr (expr_t *e)
break;
case ev_long:
case ev_ulong:
if (type->width > 1) {
e = new_horizontal_expr ('|', e, &type_long);
}
e = new_alias_expr (&type_ivec2, e);
return new_horizontal_expr ('|', e, &type_int);
case ev_ushort:

View file

@ -154,13 +154,13 @@ main (void)
// return 0;
// }
auto o = vecvecb;
if ((dvec3)o != '14 44 45'd) {
printf ("vec ∧ vecb != '14 44 45': %lv\n", o);
if ((dvec3)o != '14 44 46'd) {
printf ("vec ∧ vecb != '14 44 46': %lv\n", o);
return 1;
}
auto p = vecbvec;
if ((dvec3)p != '-14 -44 -45'd) {
printf ("vecb ∧ vec != '-14 -44 -45': %lv\n", p);
if ((dvec3)p != '-14 -44 -46'd) {
printf ("vecb ∧ vec != '-14 -44 -46': %lv\n", p);
return 1;
}
auto q = vecvecb;
@ -175,15 +175,15 @@ main (void)
}
evengrades_t s;
s.mvec= vec * vecb;
if (s.scalar != -9 || (dvec3)s.bvec != '14 44 45'd) {
printf ("vec * vecb != -9, '14 44 45': %g %lv\n",
if (s.scalar != -9 || (dvec3)s.bvec != '14 44 46'd) {
printf ("vec * vecb != -9, '14 44 46': %g %lv\n",
s.scalar, s.bvec);
return 1;
}
evengrades_t t;
t.mvec = vecb * vec;
if (t.scalar != -9 || (dvec3)t.bvec != '-14 -44 -45'd) {
printf ("vecb * vec != -9, '-14 -44 -45': %g %lv\n",
if (t.scalar != -9 || (dvec3)t.bvec != '-14 -44 -46'd) {
printf ("vecb * vec != -9, '-14 -44 -46': %g %lv\n",
t.scalar, t.bvec);
return 1;
}