Created
June 30, 2014 04:16
-
-
Save lshort/844e25bfbbd6cce2d15d to your computer and use it in GitHub Desktop.
Recursive expect_exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto show_fail = [] () { cout << "Caught Expected Exception..." << endl; }; | |
auto show_err = [] (int ignore) { cout << "Failed to Catch Exception!!!"; }; | |
auto fail1 = [z] () { graph_tests(z,'A','D', set<string>{"Topsort"}); | |
return 1; }; | |
expect_exception(fail1, true, show_fail, show_err ); | |
auto fail2 = [x, none] () { graph_tests(x,'A','D', none); return 1; }; | |
expect_exception(fail2, true, show_fail, show_err ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment