[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Math3D problems

Bart Braem

12/7/2006 3:52:00 PM

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: <TypeError>
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
6 Answers

Bart Braem

12/7/2006 4:16:00 PM

0

Bart Braem wrote:

> 3) 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

Eric Hodel

12/7/2006 10:38:00 PM

0

On Dec 7, 2006, at 08:20 , Bart Braem wrote:

> Bart Braem wrote:
>
>> 3) 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?

If this is an abstract test case then undef_method :default_test.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...

I LIT YOUR GEM ON FIRE!


Bart Braem

12/8/2006 8:12:00 AM

0

Eric Hodel wrote:

>>> 3) 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?
>
> If this is an abstract test case then undef_method :default_test.

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

Bart

Obveeus

2/3/2012 5:04:00 PM

0


"anim8rfsk" <anim8rfsk@cox.net> wrote:

> "Obveeus" <Obveeus@aol.com> wrote:
>>
>> Does 4077th M*A*S*H count?
>
> No. The 'M' stands for Mobile.

But...but...they weren't mobile. Well, ok, they did move into the brothel
that one time, but then they moved right back to their original location the
next week.


Michael Black

2/3/2012 6:01:00 PM

0

Mason Barge

2/3/2012 8:39:00 PM

0

On Fri, 3 Feb 2012 13:00:42 -0500, Michael Black <et472@ncf.ca> wrote:

>On Fri, 3 Feb 2012, Obveeus wrote:
>
>> "anim8rfsk" <anim8rfsk@cox.net> wrote:
>>
>>> "Obveeus" <Obveeus@aol.com> wrote:
>>>>
>>>> Does 4077th M*A*S*H count?
>>>
>>> No. The 'M' stands for Mobile.
>>
>> But...but...they weren't mobile. Well, ok, they did move into the brothel
>> that one time, but then they moved right back to their original location the
>> next week.
>>
>I didn't think they were that mobile. There was a certain amount of
>infrastructure, I don't know whether that was on the show or in reality,
>so they weren't so much "mobile" as "temporary".

Well, I actually know this one, since I was in the Army.

The 4077 MASH is a name, not an address. They'd have an APO box number
assigned as a mailing address.