From: Charles McGarvey Date: Fri, 25 Jan 2013 05:23:35 +0000 (-0700) Subject: specify the std abort function in C++ driver X-Git-Tag: v0.3.4~2 X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fvimcoder;a=commitdiff_plain;h=81e31744f42f77c3d8e72242c68dbff70519ca41 specify the std abort function in C++ driver This fixes a compile error in the C++ driver that occurs if the problem function has any parameter named `exit', like problem #1965. --- diff --git a/src/com/dogcows/resources/C++Driver b/src/com/dogcows/resources/C++Driver index 24ab333..8161f63 100644 --- a/src/com/dogcows/resources/C++Driver +++ b/src/com/dogcows/resources/C++Driver @@ -138,11 +138,11 @@ bool __equals(const std::vector& actual, const std::vector& expe int main(int argc, char* argv[]) { - bool __exit_on_fail = false; + bool __abort_on_fail = false; int __pass = 0; int __fail = 0; - if (1 < argc) __exit_on_fail = true; + if (1 < argc) __abort_on_fail = true; std::ifstream __in("testcases.txt"); for(;;) @@ -175,7 +175,7 @@ int main(int argc, char* argv[]) << " Actual: " << __actual << std::endl << " Expected: " << __expected << std::endl; ++__fail; - if (__exit_on_fail) exit(1); + if (__abort_on_fail) std::abort(); } }