summaryrefslogtreecommitdiff
path: root/src/main/resources/top.cpp
diff options
context:
space:
mode:
authorJim Lawson2015-11-06 14:40:30 -0800
committerJim Lawson2015-11-06 14:40:30 -0800
commit85f3006d7eac44ff21111d0f7ece1015164c0fe0 (patch)
tree60775f61ca8a481631ba67554a995ef1822b2ec0 /src/main/resources/top.cpp
parent730c951f4271120931062df674a9cd1303d226ad (diff)
parent7fe61318433a8ecaac80ef2b547a88ab9dc04aec (diff)
Merge pull request #59 from ucb-bar/testing-improvements
Further testing improvements
Diffstat (limited to 'src/main/resources/top.cpp')
-rw-r--r--src/main/resources/top.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/resources/top.cpp b/src/main/resources/top.cpp
index 8951032e..756b5531 100644
--- a/src/main/resources/top.cpp
+++ b/src/main/resources/top.cpp
@@ -78,14 +78,14 @@ int main(int argc, char** argv) {
if (tfp) tfp->close();
#endif
- if (main_time >= timeout)
+ if (main_time >= timeout) {
cout << "Simulation terminated by timeout at cycle " << main_time << endl;
- else
+ return -1;
+ } else {
cout << "Simulation completed at cycle " << main_time << endl;
-
- int error = top->io__024error;
- cout << "Simulation return value: " << error << endl;
-
- return error;
+ int error = top->io__024error;
+ cout << "Simulation return value: " << error << endl;
+ return error;
+ }
}