[Tinyos-2-commits]
CVS: tinyos-2.x-contrib/tunit/tests/tinyos-2.x/tos/system/TestStateC
TestStateC.nc, 1.2, 1.3 TestStateP.nc, 1.2, 1.3
David Moss
mossmoss at users.sourceforge.net
Tue Jan 15 13:49:25 PST 2008
Update of /cvsroot/tinyos/tinyos-2.x-contrib/tunit/tests/tinyos-2.x/tos/system/TestStateC
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv3133
Modified Files:
TestStateC.nc TestStateP.nc
Log Message:
TUnit now displays line numbers on both successes and failures.
Index: TestStateC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x-contrib/tunit/tests/tinyos-2.x/tos/system/TestStateC/TestStateC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestStateC.nc 14 Jan 2008 20:45:16 -0000 1.2
--- TestStateC.nc 15 Jan 2008 21:49:23 -0000 1.3
***************
*** 37,48 ****
implementation {
- components new StateC(),
- TestStateP,
-
- new TestCaseC() as TestForceC,
- new TestCaseC() as TestToIdleC,
- new TestCaseC() as TestRequestC,
- new TestCaseC() as TestAsyncC;
TestStateP.State -> StateC;
TestStateP.SetUp -> TestForceC.SetUp;
--- 37,48 ----
implementation {
+ components new TestCaseC() as TestForceC,
+ new TestCaseC() as TestToIdleC,
+ new TestCaseC() as TestRequestC;
+
+ components TestStateP,
+ new StateC();
+
TestStateP.State -> StateC;
TestStateP.SetUp -> TestForceC.SetUp;
***************
*** 51,55 ****
TestStateP.TestToIdle -> TestToIdleC;
TestStateP.TestRequest -> TestRequestC;
- TestStateP.TestAsync -> TestAsyncC;
}
--- 51,54 ----
Index: TestStateP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x-contrib/tunit/tests/tinyos-2.x/tos/system/TestStateC/TestStateP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestStateP.nc 14 Jan 2008 20:45:16 -0000 1.2
--- TestStateP.nc 15 Jan 2008 21:49:23 -0000 1.3
***************
*** 30,44 ****
*/
- #include "TestCase.h"
-
/**
* @author David Moss
*/
module TestStateP {
- provides {
- async command void runTestAsync();
- }
-
uses {
interface State;
--- 30,40 ----
*/
/**
* @author David Moss
*/
+ #include "TestCase.h"
+
module TestStateP {
uses {
interface State;
***************
*** 49,53 ****
interface TestCase as TestRequest;
interface TestCase as TestToIdle;
- interface TestCase as TestAsync;
}
}
--- 45,48 ----
***************
*** 111,130 ****
}
- event void TestAsync.run() {
- call runTestAsync();
- }
-
-
- async command void runTestAsync() {
- call State.forceState(S_STATE3);
- assertTrue("Async: force/getState failed", call State.getState() == S_STATE3);
- assertTrue("Async: force/isState failed", call State.isState(S_STATE3));
- assertFalse("Async: isIdle failed", call State.isIdle());
- assertTrue("Async: Req succeeded improperly", call State.requestState(S_STATE2) != SUCCESS);
- call State.toIdle();
- assertTrue("Async: toIdle failed", call State.isIdle());
- call TestAsync.done();
- }
-
}
--- 106,109 ----
More information about the Tinyos-2-commits
mailing list