Skip to content

Commit

Permalink
Fix bad tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 14, 2023
1 parent 937c897 commit dab1679
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions code/untested.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

for f in sorted(glob.glob("*.h")):
src = f.replace(".h", ".cpp")
if os.path.exists(src):
# make sure we are testing the expected instruction
if src.split(".")[0] not in open(src, 'r').read():
print("Bad test:", src)
if not os.path.exists(src):
if (
src.startswith("xvf")
Expand Down
6 changes: 3 additions & 3 deletions code/vfcvtl_d_s.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "common.h"

v128 vfcvth_d_s(v128 a) {
v128 vfcvtl_d_s(v128 a) {
v128 dst;
#include "vfcvth_d_s.h"
#include "vfcvtl_d_s.h"
return dst;
}

void test() { FUZZ1(vfcvth_d_s); }
void test() { FUZZ1(vfcvtl_d_s); }
12 changes: 6 additions & 6 deletions code/xvpickve_w_f.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "common.h"

v256 xvpickve_w(v256 a, int imm) {
v256 xvpickve_w_f(v256 a, int imm) {
v256 dst;
#include "xvpickve_w.h"
#include "xvpickve_w_f.h"
return dst;
}

void test() {
XFUZZ1(xvpickve_w, 0);
XFUZZ1(xvpickve_w, 1);
XFUZZ1(xvpickve_w, 2);
XFUZZ1(xvpickve_w, 3);
XFUZZ1(xvpickve_w_f, 0);
XFUZZ1(xvpickve_w_f, 1);
XFUZZ1(xvpickve_w_f, 2);
XFUZZ1(xvpickve_w_f, 3);
}

0 comments on commit dab1679

Please sign in to comment.