zengqh / slimdx

Automatically exported from code.google.com/p/slimdx
0 stars 0 forks source link

Unit testing #341

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 The test stuff works. Time to hit the ground running. Any subsystem you wrote, you're responsible for writing tests for. 
Priorities are at your discretion.

My advice is, don't try to test for specific results. For example, the Direct3D 
9 tests aren't trying to generate an exact 
image/render. What they are looking for is that valid calls produce sane 
behavior, and that exceptions do or don't occur in certain 
sequences of calls. They check that Get/Set calls are matched up and that the 
values you set come back as valid. They check that 
stuff that should generate invalid call exceptions do so. That kind of thing.

Original issue reported on code.google.com by promit....@gmail.com on 22 Sep 2008 at 9:31

GoogleCodeExporter commented 9 years ago
Priority drop.

Original comment by promit....@gmail.com on 23 Oct 2008 at 7:07

GoogleCodeExporter commented 9 years ago
I removed the old NUnit-based unit tests and added new ones based on Google 
Test and 
Google Mock. I'll port the old tests over in a bit.

The reason I made this change was because it's very difficult for us to test 
SlimDX 
from managed code, because it we didn't have a way to mock the native 
dependencies. 
Google Mock provides a really nice mock framework for native stuff (about as 
on-par 
with Moq and the like as you can expect from native code), and includes Google 
Test 
as part of its distribution, which is itself pretty good. As a result I didn't 
see a 
need to keep NUnit around... especially since introducing GMock and GTest 
increases 
the Boost surface area we're depending on.

Original comment by josh.petrie on 5 Apr 2009 at 2:22

GoogleCodeExporter commented 9 years ago
Closing because this is an obvious general work item.

Original comment by josh.petrie on 9 Nov 2009 at 3:05