Paul said:
For some reason, you have a very limited math library on your system.
Chances are you will succeed in the compilation if you will replace your
math library with a complete one.
I removed the check for the function and now the Makefile is perfectly
generated and make works flawlessly. Make test fails however:
make test
ruby test.rb
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require__': ./tests/Vector.tests.rb:556: no .<digit> floating literal
anymore; put 0 before dot (SyntaxError)
expected = vec.to_a.inject(0) {|x,y| x+(y*y)}.**(.5)
^
../tests/Vector.tests.rb:556: parse error, unexpected '.', expecting ')'
expected = vec.to_a.inject(0) {|x,y| x+(y*y)}.**(.5)
^
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
from test.rb:30
from /usr/lib/ruby/1.8/find.rb:39:in `find'
from /usr/lib/ruby/1.8/find.rb:38:in `catch'
from /usr/lib/ruby/1.8/find.rb:38:in `find'
from test.rb:20
make: *** [test] Error 1
Turning .5 into 0.5 fixed that. Afterwards I got this error:
make test
ruby test.rb
../tests/Matrix4.tests.rb:32: warning: default `to_a' will be obsolete
../tests/Bound.tests.rb:30: warning: default `to_a' will be obsolete
../tests/Require.tests.rb:27: warning: parenthesize argument(s) for future
version
Required 9 files.
test.rb:45:in `suite': undefined method `add' for
#<Test::Unit::TestSuite:0x404e0b84> (NoMethodError)
from test.rb:44:in `each_object'
from test.rb:44:in `suite'
from /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:27:in
`initialize'
from test.rb:53:in `new'
from test.rb:53
make: *** [test] Error 1
(I'll ignore the to_a warnings, those tests work)
But the suite method add is missing, I replaced it with the << method in
test.rb:
ObjectSpace.each_object( Class ) {|klass|
suite << klass.suite if klass < Test::Unit::TestCase
}
Next my tests ran, without good results:
make test
ruby test.rb
../tests/Matrix4.tests.rb:32: warning: default `to_a' will be obsolete
../tests/Bound.tests.rb:30: warning: default `to_a' will be obsolete
../tests/Require.tests.rb:27: warning: parenthesize argument(s) for future
version
Required 9 files.
Loaded suite Math3d Test Suite
Started
EEE.EEEEEE....EEEEEEEEEEE.EEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EEEEEEFFEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Finished in 0.207462 seconds.
1) Error:
test_00_7_contains?(OrthoTestCase):
NoMethodError: undefined method `each' for nil:NilClass
./tests/Ortho.tests.rb:65:in `test_00_7_contains?'
./tests/m3dUnitTest.rb:63:in `run'
Somehow the setup methods don't work? It seems there is something wrong with
the testsuite, but I don't see what...
Bart