LukasBombach / de1

JavaScript API for the DE1 Espresso Machine
MIT License
21 stars 0 forks source link

Parser tests refctoring #14

Closed LukasBombach closed 4 years ago

LukasBombach commented 4 years ago

Remodeled parser tests to use snapshots throughout the test. The snapshots themselves should still be readable as the numbers used as input are also the numbers that are returned.

oscar-b commented 4 years ago

I think we should dump some real binary data from the machine as well, in different stages, and use that. There can be cases where parsing a number works when it’s below a certain threshold, but is incorrectly parsed when above it (LSB and endianess and whatever).

Snapshotting the responses is fine, I think. We just need to double check the snapshots are correct now, comparing it to the Decent UI. Are there any tests in the Tcl code with test data?

LukasBombach commented 4 years ago

Makes sense, definitely. I am not sure, but I think there are no tests at all in the TCL app

LukasBombach commented 4 years ago

Are you still ok with merging this now?

LukasBombach commented 4 years ago

😍