Raku / nqp

NQP
Other
345 stars 131 forks source link

Opcode test coverage needs improving #686

Open coke opened 3 years ago

coke commented 3 years ago

Recently updated the t/docs/tests.t test (written in Raku) to verify that all documented opcodes are test (and all used opcodes are documented)

Currently has 263 failures.

coke commented 3 years ago

154 of those failures are opcodes that are documented but not included anywhere in test/build (t src/NQP src/how src/core src/HLL src/QRegex)

abs_I add_I add_i64 asyncconnect asynclisten asyncreadbytes asyncwritebytes atomicadd_i atomicbindattr atomicdec_i
atomicinc_i atomicload atomicload_i atomicstore atomicstore_i atposref backtrace barrierfull base_I bindkey_o
bindlex bindlex_i bindlex_n bindlex_s bitand_I bitneg_I bitor_I bitshiftl_I bitshiftr_I bitxor_I
bool_I boothash bootint bootintarray bootnum bootnumarray bootstr bootstrarray box_u cancel
cas cas_i charsnfg chmod cmp_I coerce_in coerce_ni coerce_ns coerce_sn cpucores
debugnoop decodetocodes div_I div_In encodefromcodes eqaticim expmod_I falsey fileexecutable filenofh
filereadable filewritable for force_gc freemem fromI_I fromnum_I fromstr_I gcd_I gethostname
getlex_i getlex_n getlex_s getlexref_i getlexref_n getlexref_s getpid getport getppid getrusage
getsignals getuniprop_bool getuniprop_int getuniprop_str hasuniprop hllbool hllboxtype_i hllboxtype_n hllboxtype_s hllhash
hlllist indexfrom intify isbig_I iscclassnfg iscoderef iseq_I iseq_s iseq_snfg isge_I
isgt_I isle_I islt_I isne_I isne_s isne_snfg isprime_I js jvmclasspaths killprocasync
lcm_I list_b matchuniprop mod_I mul_I mvmendprofile mvmstartprofile nativecallcast nativecallglobal nativecallinvoke
nativecallrefresh nativecallsizeof neg_I ordfirst pow_I push_o radix_I rand_I rand_i readint
rindexfrom rindexfromend shift_n shift_o signal sprintfdirectives sub_I sub_i64 substr2 substr3
substr_s substrnfg threadlockcount timer tonum_I tostr_I totalmem uname unbox_u unicmp_s
unipropcode unipvalcode unshift_n watchfile
MasterDuke17 commented 3 years ago

Something is off with the test, https://github.com/Raku/nqp/blob/master/t/nqp/060-bigint.t#L32 explicitly has an nqp::add_I (and a lot of the other *_I ops too).

MasterDuke17 commented 3 years ago

Ah, https://github.com/Raku/nqp/blob/master/t/docs/tests.t#L39 (and line 42) should be case-insensitive (or just include 'I').

MasterDuke17 commented 3 years ago

Looks like the new list of 118 is:

add_i64
asyncconnect
asynclisten
asyncreadbytes
asyncwritebytes
atomicadd_i
atomicbindattr
atomicdec_i
atomicinc_i
atomicload
atomicload_i
atomicstore
atomicstore_i
atposref
backtrace
barrierfull
bindkey_o
bindlex
bindlex_i
bindlex_n
bindlex_s
boothash
bootint
bootintarray
bootnum
bootnumarray
bootstr
bootstrarray
box_u
cancel
cas
cas_i
charsnfg
chmod
coerce_in
coerce_ni
coerce_ns
coerce_sn
cpucores
debugnoop
decodetocodes
encodefromcodes
eqaticim
falsey
fileexecutable
filenofh
filereadable
filewritable
for
force_gc
freemem
gethostname
getlex_i
getlex_n
getlex_s
getlexref_i
getlexref_n
getlexref_s
getpid
getport
getppid
getrusage
getsignals
getuniprop_bool
getuniprop_int
getuniprop_str
hasuniprop
hllbool
hllboxtype_i
hllboxtype_n
hllboxtype_s
hllhash
hlllist
indexfrom
intify
iscclassnfg
iscoderef
iseq_s
iseq_snfg
isne_s
isne_snfg
js
jvmclasspaths
killprocasync
list_b
matchuniprop
mvmendprofile
mvmstartprofile
nativecallcast
nativecallglobal
nativecallinvoke
nativecallrefresh
nativecallsizeof
ordfirst
push_o
rand_i
readint
rindexfrom
rindexfromend
shift_n
shift_o
signal
sprintfdirectives
sub_i64
substr2
substr3
substr_s
substrnfg
threadlockcount
timer
totalmem
uname
unbox_u
unicmp_s
unipropcode
unipvalcode
unshift_n
watchfile
coke commented 2 years ago
$ ./t/docs/tests.t  2>&1 | grep 'not ok' | wc -l
     218