|
From: | Kristian Lein-Mathisen |
Subject: | Re: [Chicken-hackers] incorrect warning during compilation |
Date: | Fri, 11 Jul 2014 10:32:23 +0200 |
We can't use the test egg in core. However, there are so many hand-
rolled assertion/test-like macros that I've often wondered if it would
benefit us to make a simple test library part of core. Core itself
could benefit from an improved test suite library, and eggs wouldn't
need an additional dependency for testing. I don't think I want to
literally put the test egg into core. I like the simplicity of the API
but the implementation is a bit messy and it's a bit hard to modify
the way it writes its output (try changing it to output some HTML,
for example). This may just be a documentation problem, though.
Anyway, your test would probably succeed even if the pointer type would
be incorrect. It would just compile with a warning (which gets lost
in the noise). If you change the index to 1 or 2, it might be a better
test since it would fail when the pointer type would be anything larger
than a char due to the address calculation ending up somewhere beyond
the string. Additionally, we could compile the test with -Wall -Werror
for example, to catch C type errors. Would you care to write a complete
patch to add FFI tests? You can mail it with "git format-patch"
[Prev in Thread] | Current Thread | [Next in Thread] |