aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/main.cpp b/main.cpp
index 0ff11b2..5fcfb3e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -35,7 +35,7 @@ int main(int argc, char** argv) {
main_parser.set_circuit(circuit);
- ifstream file("circuits/full-adder.txt");
+ ifstream file("circuits/and-test.txt");
try {
file >> main_parser;
@@ -45,12 +45,12 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
- // try {
- // circuit.run();
- // } catch (exception& e) {
- // cout << "Circuit error: " << e.what() << endl;
- // return EXIT_FAILURE;
- // }
+ try {
+ circuit.sim();
+ } catch (CircuitException & e) {
+ cout << "Circuit error: " << e.what() << endl;
+ return EXIT_FAILURE;
+ }
// cout << "Circuit output: " << circuit.getOutput() << endl;