diff --git a/mhd.cpp b/mhd.cpp index 9423484..d7a3c14 100644 --- a/mhd.cpp +++ b/mhd.cpp @@ -177,8 +177,12 @@ int main() try { - t.findCheapest("Nhttps://fit-wiki.cz/%C5%A1kola/p%C5%99edm%C4%9Bty/bi-pa2/pa2_zkou%C5%A1ka_2023-06-08= ""); - cout << "chyceno" << endl; + t.findCheapest("Namesti Miru", "Terminal 2"); + assert(false); + } + catch (const logic_error &e) + { + assert(true); } CPublicTransport t2; @@ -205,7 +209,7 @@ int main() CPublicTransport t3; - t3.addLine(1, {"A", "B", "C", "D", "E"}) + t3.addLine(1, {"A", "B", "C", "D", "E"}) .addLine(2, {"F", "G", "H", "E", "I"}) .addLine(3, {"J", "K", "L", "B", "M"}) .addLine(2, {"N", "O", "P", "Q", "E"}) @@ -220,10 +224,11 @@ int main() try { t3.findCheapest("A", "Hd"); + assert(false); } catch (const logic_error &e) { - assert(string(e.what()) != ""); + assert(true); } assert(t3.findCheapest("A", "E") == 1); @@ -300,10 +305,11 @@ int main() try { t3.findCheapest("Orionka", "Andel"); + assert(false); } catch (const logic_error &e) { - assert(string(e.what()) != ""); + assert(true); } cout << "ALL ASSERTS PASSED!" << endl;