????????????????
????doh?????????????????????

 

doh.assertTrue(boolean)
Note: This function is aliased to doh.t();
doh.assertFalse(boolean)
Note: This function is aliased to doh.f();
doh.assertEqual(obj1?? obj2)
Note: This function is aliased to doh.is();
doh.assertNotEqual(obj1?? obj2)
Note: This function is aliased to doh.isNot()??

????Junit?У???д?????????????????????Junit???????doh???????????????????δ????????doh??????????????

????doh????????????·????????????doh.register????

 

doh.register(...)
An almost 'magical' function. The doh.register() method accepts the function signatures of any of the other registration functions and determines the correct underlying function (listed below) to dispatch registration to. It's the function you'll most commonly use for registering Unit Tests.
doh.registerTest(group?? testFuncOrObj)
This function registers a test as a member of the group 'group'?? and the test can either be a simple function definition or a 'Test Fixture'?? which is an object that defines the run requirements of the test.
doh.registerTests(group?? testFuncOrObjArr)
This function registers an array of tests as a member of the group 'group'. The contents of the array of tests can be an array of simple test functions or an array of 'test fixtures'?? or a mix of them.
doh.registerTestNs(group?? obj)
This function registers an object comprised of functions as a member of the group 'group'. Note that this function will only add in non-private (functions without an _ at the beginning of the name)?? as a test function. If you'd like to use fixtures (setUp()?? tearDown()?? and runTest())?? please use doh.register()?? doh.registerTest() or doh.registerTests().
doh.registerTestUrl(url)
This function registers a URL as a location to load tests from. The URL is used to populate the contents of an iframe?? and usually refers to an HTML page that boot-loads D.O.H. internally for running tests in a segmented iframe. A good example showing this is the dojo/tests/fx.html. It loads dojo?? doh?? and then on dojo load completion calls doh.registerTests(). The D.O.H. instance in the iframe will proxy back the results of the test run to the primary D.O.H. instance.

????????????dojo/test/fx???????????????????????????????????TestSuite??
????define(["doh/main"?? "require"]?? function(doh?? require){
????if(doh.isBrowser){
????doh.register("tests.fx"?? require.toUrl("./fx.html")?? 30000);
????doh.register("tests.NodeList-fx"?? require.toUrl("./NodeList-fx.html")?? 30000);
????}
????});
?????????runner.html??

???????????μ?fx.html?????????????????????ж?????????TestCase