|
@@ -1,5 +1,5 @@
|
|
|
/**
|
|
/**
|
|
|
-* Copyright (c) 2012 committers of YAKINDU and others.
|
|
|
|
|
|
|
+* Copyright (c) 2013 committers of YAKINDU and others.
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
|
* which accompanies this distribution, and is available at
|
|
* which accompanies this distribution, and is available at
|
|
@@ -17,12 +17,12 @@ TEST(StatemachineTest, test_100_000) {
|
|
|
performanceTest_init(&handle);
|
|
performanceTest_init(&handle);
|
|
|
performanceTest_enter(&handle);
|
|
performanceTest_enter(&handle);
|
|
|
EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
|
|
EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
|
|
|
- while (performanceTestIface_get_c(&handle)< 100000) {
|
|
|
|
|
|
|
+ while (performanceTestIface_get_c(&handle) < 100000) {
|
|
|
if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
|
|
if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
|
|
|
performanceTestIface_raise_e1(&handle);;
|
|
performanceTestIface_raise_e1(&handle);;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- if (performanceTestIface_get_c(&handle)%2== 0) {
|
|
|
|
|
|
|
+ if (performanceTestIface_get_c(&handle) %2== 0) {
|
|
|
performanceTestIface_raise_e2(&handle);;
|
|
performanceTestIface_raise_e2(&handle);;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
@@ -32,19 +32,19 @@ TEST(StatemachineTest, test_100_000) {
|
|
|
}
|
|
}
|
|
|
performanceTest_runCycle(&handle);
|
|
performanceTest_runCycle(&handle);
|
|
|
}
|
|
}
|
|
|
- EXPECT_TRUE(performanceTestIface_get_a(&handle)> 2);
|
|
|
|
|
|
|
+ EXPECT_TRUE(performanceTestIface_get_a(&handle) > 2);
|
|
|
}
|
|
}
|
|
|
TEST(StatemachineTest, test_1_000_000) {
|
|
TEST(StatemachineTest, test_1_000_000) {
|
|
|
PerformanceTest handle;
|
|
PerformanceTest handle;
|
|
|
performanceTest_init(&handle);
|
|
performanceTest_init(&handle);
|
|
|
performanceTest_enter(&handle);
|
|
performanceTest_enter(&handle);
|
|
|
EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
|
|
EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
|
|
|
- while (performanceTestIface_get_c(&handle)< 1000000) {
|
|
|
|
|
|
|
+ while (performanceTestIface_get_c(&handle) < 1000000) {
|
|
|
if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
|
|
if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
|
|
|
performanceTestIface_raise_e1(&handle);;
|
|
performanceTestIface_raise_e1(&handle);;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- if (performanceTestIface_get_c(&handle)%2== 0) {
|
|
|
|
|
|
|
+ if (performanceTestIface_get_c(&handle) %2== 0) {
|
|
|
performanceTestIface_raise_e2(&handle);;
|
|
performanceTestIface_raise_e2(&handle);;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
@@ -54,19 +54,19 @@ TEST(StatemachineTest, test_1_000_000) {
|
|
|
}
|
|
}
|
|
|
performanceTest_runCycle(&handle);
|
|
performanceTest_runCycle(&handle);
|
|
|
}
|
|
}
|
|
|
- EXPECT_TRUE(performanceTestIface_get_a(&handle)> 2);
|
|
|
|
|
|
|
+ EXPECT_TRUE(performanceTestIface_get_a(&handle) > 2);
|
|
|
}
|
|
}
|
|
|
TEST(StatemachineTest, test_10_000_000) {
|
|
TEST(StatemachineTest, test_10_000_000) {
|
|
|
PerformanceTest handle;
|
|
PerformanceTest handle;
|
|
|
performanceTest_init(&handle);
|
|
performanceTest_init(&handle);
|
|
|
performanceTest_enter(&handle);
|
|
performanceTest_enter(&handle);
|
|
|
EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
|
|
EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
|
|
|
- while (performanceTestIface_get_c(&handle)< 10000000) {
|
|
|
|
|
|
|
+ while (performanceTestIface_get_c(&handle) < 10000000) {
|
|
|
if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
|
|
if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
|
|
|
performanceTestIface_raise_e1(&handle);;
|
|
performanceTestIface_raise_e1(&handle);;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- if (performanceTestIface_get_c(&handle)%2== 0) {
|
|
|
|
|
|
|
+ if (performanceTestIface_get_c(&handle) %2== 0) {
|
|
|
performanceTestIface_raise_e2(&handle);;
|
|
performanceTestIface_raise_e2(&handle);;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
@@ -76,5 +76,5 @@ TEST(StatemachineTest, test_10_000_000) {
|
|
|
}
|
|
}
|
|
|
performanceTest_runCycle(&handle);
|
|
performanceTest_runCycle(&handle);
|
|
|
}
|
|
}
|
|
|
- EXPECT_TRUE(performanceTestIface_get_a(&handle)> 2);
|
|
|
|
|
|
|
+ EXPECT_TRUE(performanceTestIface_get_a(&handle) > 2);
|
|
|
}
|
|
}
|