Code center > Darwinbots3

Helping

<< < (7/9) > >>

Numsgil:
What do you mean exactly by visualization?

There isn't a DB3.exe you can run right now.  I'm still building all the pieces individually and haven't put them all together yet.

If you mean how you'd view a SVG file, you'd open it in Chrome or Firefox (Chrome seems to have the best support).

...

For DB2, I think there's a iesara.vbp file, or something like that.  It's in VB6, so you'd need to find a copy of the Visual Basic 6 IDE.

Peter:
I mean, what do I need to run to generate those SVG files.

rwill128:
So I'll check out the changes you checked in recently, but also I have a few questions about the AzimuthUnitTests.

I've been running a few to watch the code work, but I noticed that the first few times I ran the debugger on Azimuth.UnitTests, it tested a few chunks of code in Azimuth.

Now it doesn't seem to be doing so. As soon as the Main() method of Azimuth.UnitTests.Program passes control to UnitTestSharp by calling UnitTestSharp.TestRunner.RunAllTests(), it seems to never get back into the Azimuth code.

So now I've got the UnitTestSharp code and the Azimuth code in the same VS solution, and I can watch the code go from Azimuth.UnitTests.Program.Main into the UnitTestSharp code.

I've also browsed the TestsForUnitTestSharp code, and it appears most of UnitTestSharp is untested, according to a few TODO comments in the code. Does that explain why UnitTestSharp.TestRunner.RunAllTests() does not, in fact, appear to be running all the tests?

Numsgil:
@Peter: Oh, there's some SVG files getting generated for failing tests as part of Annulus.  Look at CheckSimilarity in StriaghtSkeletonBuilderTests.cs.  Right now all the tests are passing and I don't think any files are getting generated.  But if you comment out the if (oldFailedChecks != this.internals.FailedChecks) check, it will always generate them.

@rwill: UnitTestSharp works by searching through the given assembly and finding all the tests using runtime reflection.  There's never a place where it will explicitly call any methods in Azimuth.  Instead, they're called indirectly.  And in fact, the actual test methods are wrapped in worker threads, so you can't even really walk it up the callstack.

Your best bet is to set breakpoints inside individual tests in Azimuth.UnitTests if you want to watch them run.  Then make sure Azimuth.UnitTests is the "startup process" by right clicking on the project in Visual Studio and finding that option in the right click menu.  Then Debug->Start Debugging, and your breakpoints should hit.

As for TestsForUnitTestSharp, most everything is tested except for some super high level code, just because it's awkward to do. :/

Peter:
I actually have some tests failing. But they didn't generate SVG files. I do get SVG files if I uncomment that line.

These are the tests failing. Any idea why they fail for me? :(

--- Quote ---Warning   1   "The triangulator needs to be able to handle non parallel edges." in "Annulus.UnitTests.CSG::TriangulationTests.FindSharedEdgesTests::Parallel"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\CSG\TriangulationTests.cs   1207   Annulus.UnitTests
Warning   2   "CutEdgesWithNearbyVertices tests." in "Annulus.UnitTests.CSG::TriangulationTests.CutEdgesWithNearbyVerticesTests::Todo"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\CSG\TriangulationTests.cs   1215   Annulus.UnitTests
Error   3   "Expected "SUCCESS" but was "BOUNDS_EXCEEDED"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingCornervsRotatingSegmentTests.VertexVertex::LinearVelocity_Grinding_SolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingCornervsRotatingSegmentTests.cs   1639   Annulus.UnitTests
Error   4   "null" in "Annulus.UnitTests.SweptCollisionDetection::RotatingCornervsRotatingSegmentTests.VertexVertex::LinearVelocity_Grinding_SolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingCornervsRotatingSegmentTests.cs   1640   Annulus.UnitTests
Error   5   "Expected "SUCCESS" but was "BOUNDS_EXCEEDED"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingSimplePolygonvsRotatingSimplePolygonTests::EdgeEdgeSolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingSimplePolygonvsRotatingSimplePolygonTests.cs   55   Annulus.UnitTests
Error   6   "Expected "4" but was "NaN"" in "Annulus.UnitTests.SweptCollisionDetection::RotatingSimplePolygonvsRotatingSimplePolygonTests::EdgeEdgeSolidHit"   c:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Modules\Annulus\Annulus.UnitTests\SweptCollisionDetection\RotatingSimplePolygonvsRotatingSimplePolygonTests.cs   56   Annulus.UnitTests
Error   7   The command ""C:\Users\Peter\Documents\Visual Studio 2012\Projects\Azimuth\Junk\Annulus.UnitTests\Debug\Annulus.UnitTests.exe"" exited with code 2.   Annulus.UnitTests
--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version