src/tests/merger_tests/getRange.cpp
/*
 * tests if a ParsingException is thrown when there is an unopened range closed
 */
tests if a ParsingException is thrown when there is an unopened range closed
tests if a ParsingException is thrown when there is an unopened range closed
TEST (getRange, closingRangeWithoutOpen) {
    string testString = "3 ] [ 7 9 ]";
    istringstream iss(testString);
    try {
        auto result = getRange(iss, IN);
        FAIL() << "Expected Parsing Exception!";
    } catch (ParsingException e) {
        EXPECT_EQ(e.what(), "Parsing Exception!");
    } catch (exception e) {
        FAIL() << "Expected Parsing Exception, but got " << e.what();
    }
}
TEST ( getRange , closingRangeWithoutOpen ) { string testString = " " ; istringstream iss ( testString ) ; try { auto result = getRange ( iss , IN ) ; FAIL ( ) << " " ; } catch ( ParsingException e ) { EXPECT_EQ ( e . what ( ) , " " ) ; } catch ( exception e ) { FAIL ( ) << " " << e . what ( ) ; } }
tests if a ParsingException is thrown when there is an unopened range closed
tests if a ParsingException is thrown when there is an unopened range closed