The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

Legacy:UsUnit/Discussion

From Unreal Wiki, The Unreal Engine Documentation Site
< Legacy:UsUnit
Revision as of 12:59, 15 September 2005 by El Muerte (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Differences between UsUnit and DUnit and JUnit

Even though UsUnit tries to be similar to JUnit and DUnit it does not always work the same way. This is mostly because of missing features in UnrealScript.

No reflection

UnrealScript doesn't have any (decent) reflection. Because of this TestCases don't work like in DUnit. There's only one entry point per TestCase (e.g. the run() function). In DUnit you can have multiple entry points for the same class, each entry point would have it's own instance. In UsUnit you will simply have to create multiple TestCases and a TestSuite.

No test registration

There is no package initialization code in UnrealScript and no relfection. Therefor it's not possible to find all available tests. There is some code (for UE2.5 only) that can find tests in a package but it's a rather dirty hack. Also it works well when the package is not loaded already.


you can add your comments, feature requests, bug reports, etc. here