# Math3D problems

**URL:** <https://www.ruby-forum.com/t/math3d-problems/78655>\
**Category:** Ruby\
**Created:** [December 7, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/math3d-problems/78655 "2006-12-07T16:55:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [December 7, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/math3d-problems/78655/1 "2006-12-07T16:55:25Z")

</div>

After my previous batch of test failures I am now up to this point:  
tests  
run but they fail. I had to fix a lot of problems with TestCase setup  
methods being called set\_up instead of setup, could that be an old  
naming?  
My results now:

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  
Required 9 files.  
Loaded suite Math3d Test Suite  
Started  
…E…E…FF…  
Finished in 0.282159 seconds.

1. Error:  
test\_06\_get\_column(Matrix4TestCase):  
NameError: uninitialized constant Math3d::IndexError  
./tests/Matrix4.tests.rb:137:in `test_06_get_column' ./tests/Matrix4.tests.rb:132:in`each’  
./tests/Matrix4.tests.rb:132:in `test_06_get_column' ./tests/m3dUnitTest.rb:63:in`run’

2. Error:  
test\_15\_singular?(Matrix4TestCase):  
NameError: uninitialized constant Math3d::InvertError  
./tests/Matrix4.tests.rb:242:in `test_15_singular?' ./tests/Matrix4.tests.rb:236:in`each’  
./tests/Matrix4.tests.rb:236:in `test_15_singular?' ./tests/m3dUnitTest.rb:63:in`run’

3. Failure:  
default\_test(Math3d::TestCase) [./tests/m3dUnitTest.rb:63]:  
No tests were specified.

4. Failure:  
test\_00\_Instantiate(VectorsTestCase)  
[./tests/Vector.tests.rb:102:in `test_00_Instantiate' ./tests/Vector.tests.rb:91:in`each’  
./tests/Vector.tests.rb:91:in `test_00_Instantiate' ./tests/Vector.tests.rb:88:in`each’  
./tests/Vector.tests.rb:88:in `test_00_Instantiate' ./tests/m3dUnitTest.rb:63:in`run’]:  
Exception raised:  
Class:   
Message: \<“wrong argument type nil (expected Array)”\>  
—Backtrace—  
./tests/Vector.tests.rb:102:in `new' ./tests/Vector.tests.rb:102:in`test\_00\_Instantiate’  
./tests/Vector.tests.rb:102:in `test_00_Instantiate' ./tests/Vector.tests.rb:91:in`each’  
./tests/Vector.tests.rb:91:in `test_00_Instantiate' ./tests/Vector.tests.rb:88:in`each’  
./tests/Vector.tests.rb:88:in `test_00_Instantiate' ./tests/m3dUnitTest.rb:63:in`run’

* * *

159 tests, 1458 assertions, 2 failures, 2 errors

Those warnings won’t be a problem. Errors 1 and 2 seems related to the  
definition of the Errors, did anyone find out how the Math3D library is  
initialized? This is where in the C code these errors are defined…  
Failures 3 and 4 can be related, if no tests returns nil in 3 then 4 is  
a  
possible result.

Any ideas? Unless the Error-problems are solved I can’t use the library,  
unfortunately.

Thanks for your help,  
Bart

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [December 7, 2006, 5:21pm UTC](https://www.ruby-forum.com/t/math3d-problems/78655/2 "2006-12-07T17:21:31Z")

</div>

Bart B. wrote:

> 1. Failure:  
> default\_test(Math3d::TestCase) [./tests/m3dUnitTest.rb:63]:  
> No tests were specified.

Right, this failure was a matter of not running the default  
Math3d::TestCase  
when running all tests in test.rb:

ObjectSpace.each\_object( Class ) {|klass|  
suite \<\< klass.suite if (klass \<  
Test::Unit::TestCase and klass !=  
Math3d::TestCase)  
}

Any ideas for the other failures?

Bart

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [December 7, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/math3d-problems/78655/3 "2006-12-07T23:39:18Z")

</div>

On Dec 7, 2006, at 08:20 , Bart B. wrote:

> ObjectSpace.each\_object( Class ) {|klass|  
> suite \<\< klass.suite if (klass \<  
> Test::Unit::TestCase and klass !=  
> Math3d::TestCase)  
> }
> 
> Any ideas for the other failures?

If this is an abstract test case then undef\_method :default\_test.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)

I LIT YOUR GEM ON FIRE!

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [December 8, 2006, 9:16am UTC](https://www.ruby-forum.com/t/math3d-problems/78655/4 "2006-12-08T09:16:06Z")

</div>

Eric H. wrote:

> > Test::Unit::TestCase and klass !=  
> > Math3d::TestCase)  
> > }
> > 
> > Any ideas for the other failures?
> 
> If this is an abstract test case then undef\_method :default\_test.

That is a much nicer solution, thanks for the advice!

Bart
