"Andrew Bachmann" <andrewbachmann@xxxxxxxxxxxxx> wrote: > "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> wrote: > > "Andrew Bachmann" <andrewbachmann@xxxxxxxxxxxxx> wrote: > > > I have added some math tests to: src/tests/kernel/libroot/posix/ > > > math > > > They currently just print a table of the values from our cos/sin > > > functions and the values from libbe. The results are the same as > > > Stephan reported. (these functions don't work properly) > > Great! > > BTW why do you need to define "national" for the libroot.so build > > but > > not for you test application? > I had to define it for both. It's not defined in the Jamfile for the test! That's why I ask. > > > Two side notes: > > > 1. the tests should probably be moved from "kernel" to "system", > > > like the src subdirectory was a little while back. > > Definitely, I just didn't find the time to do it yet. > I thought "this is easy now that we have svn" then I realized that > all > the Jamfiles have to change too. Yes :-) I've written a small script for this, but some paths might need manual adjustment anyway. > > > 2. the math test uses get_image_symbol to retrieve the libbe > > > function pointers for cos/sin, which is a technique that could > > > be useful for other tests as well. > > Not too useful most of the time, as these tests are usually thought > > to > > run under both platforms. Ie. also, and especially, natively under > > Haiku, for example. > > It's better to test against known behaviour (like sin^2 + cos^2 == > > 1 in > > your test). > Although the way the test is currently written it should also run > under haiku, a large portion of it will be moot since libroot.so in > haiku will be the same code as the test. :-) Exactly :-) Bye, Axel.