Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opcode test coverage needs improving #686

Open
coke opened this issue Dec 6, 2020 · 5 comments
Open

Opcode test coverage needs improving #686

coke opened this issue Dec 6, 2020 · 5 comments

Comments

@coke
Copy link
Contributor

coke commented Dec 6, 2020

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
Copy link
Contributor Author

coke commented Dec 7, 2020

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

coke commented Feb 5, 2022

$ ./t/docs/tests.t  2>&1 | grep 'not ok' | wc -l
     218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants