-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add tests #7
Add tests #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rough thoughts on the current stuff
I like the idea of hosting simple tests from our own C files. Depending on how many tests there ends up being it would be nice to split each test into it's own python file, but this is fine for now. test.py
in root can probably also go.
Three small nits
@@ -0,0 +1 @@ | |||
#include "../libgfxd/gbi.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could an include path for libgfxd be specified in the makefile rather than this dummy file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea with this wrapper .h would also be to let someone try another gbi.h, since libgfxd's is glank's i.e. not sgi's / decomp's
But yeah this can be changed idk
subrepo: subdir: "libgfxd" merged: "7dd7fa1" upstream: origin: "https://github.com/glankk/libgfxd" branch: "master" commit: "7dd7fa1" git-subrepo: version: "0.4.5" origin: "[email protected]:ingydotnet/git-subrepo.git" commit: "dbb99be"
libgfxd 7dd7fa16227f6d4c336abfda353d01f833334413 Update/add `gfxd_light_callback`, `gfxd_lightsn_callback` Add binding for `gfxd_foreach_pkt` Update description for `gfxd_macro_fn`
gfxd_target(gfxd_f3dex2) | ||
gfxd_endian(GfxdEndian.big, 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about putting this everywhere 🤷
Probably deal with it if/when someone uses something other than the Superior ™️ Ucode f3dzex
def callback(bufP, count): | ||
newdata = remaining_data[0][:count] | ||
from ctypes import c_char | ||
|
||
buftype = c_char * len(newdata) | ||
buf = buftype.from_address(bufP) | ||
buf[: len(newdata)] = newdata | ||
remaining_data[0] = remaining_data[0][len(newdata) :] | ||
return len(newdata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: this could be improved on the pygfxd wrapper side
…is stored... of course...
Start adding tests
The current "test" stuff: