OLD | NEW |
(Empty) | |
| 1 DARTest is a test infrastructure for Dart applications. |
| 2 |
| 3 To use the in-app test runner, follow these steps: |
| 4 1. Import dartest as a library. |
| 5 #import('dart/testing/unittest/unittest_dartest.dart'); |
| 6 #import('dart/testing/dartest/dartest.dart'); |
| 7 |
| 8 |
| 9 2. Write tests for the application in a function, call the test functions and |
| 10 then run dart: |
| 11 |
| 12 test('Test Description',(){ |
| 13 Expect.equals(3, myAddFunc(1,2)); |
| 14 }); |
| 15 new DARTest().run(); |
| 16 |
| 17 |
| 18 3. Thats all! Now when you compile and run your application, you should |
| 19 see the DARTest in-app overlay window. |
| 20 |
| 21 For an example, see tests in $DART/client/tests/client/samples/total/total_darte
st.dart |
| 22 |
OLD | NEW |