Wikipedia
UnitTestCg
UnitTestCg is an open source unit test framework for Cg and HLSL programs. It has not been updated since its initial release in 2007. UnitTestCg supports both Cg 1.5b2 and DX9 HLSL.