Commit graph

8 commits

Author SHA1 Message Date
Michael Miller
28ae03d56f
Remove expect_null_double
Workaround no longer needed.
2022-03-25 22:45:13 -06:00
Michael Miller
0b6e44c227
Fix types of arguments given to common object methods 2022-03-20 15:39:19 -06:00
Michael Miller
b3fa2e3bfe
Address Ameba issues 2022-03-19 17:22:13 -06:00
Michael Miller
0c7f72dc78
Test handling of blocks in doubles 2022-03-19 17:04:51 -06:00
Michael Miller
4f7a4a3453
Avoid issue with TypeCastError message
For some reason, attempting to get the class of the stubbed value causes a segfault.
This appears to get swallowed in some cases.
Trying to inspect the value was difficult without triggering some error.
In the failing case, the value is 42 (returned by a stubbed foo method).
The method is supposed to return a String, and this error checking should be triggered (line 119).
The value is a union, and inspecting the bytes contained in it looks like it's prefixed with the Crystal type ID for Int32.
However it looks like Crystal tries to treat it as a Bool? I'm not sure.
Very weird behavior and instead of wasting more time on it, I'm omitting the returned type from the error.
This type of casting error shouldn't be common.
This seems like a Crystal bug, but I'm having a hard time distilling the issue.
2022-03-16 22:40:24 -06:00
Michael Miller
280f117e23
Use TypedStub instead of ValueStub
Test possible issues around stub returning nil
2022-03-16 21:07:20 -06:00
Michael Miller
332ab1cebc
Smarter handling of stub fallback 2022-03-15 22:46:43 -06:00
Michael Miller
ca827a3c52
Initial work on null (object) double 2022-03-12 17:07:34 -07:00