src/tests/merger_tests/getRange.cpp
TEST (getRange, twoOpenRangesWithoutClosing) {
    string testString = "[ 1 [ 3 17 ] ]";
    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();
    }
}
/*
 * tests if a ParsingException is thrown when opening two ranges without closing the first one
 */
tests if a ParsingException is thrown when opening two ranges without closing the first one
tests if a ParsingException is thrown when opening two ranges without closing the first one
TEST (getRange, twoOpenRangesWithoutClosing) {
    string testString = "[ 1 [ 3 17 ] ]";
    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 , twoOpenRangesWithoutClosing ) { 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 opening two ranges without closing the first one
tests if a ParsingException is thrown when opening two ranges without closing the first one