mhd dijkstra

This commit is contained in:
hladu357 2024-05-21 09:25:15 +02:00
parent 9b2150fe23
commit a901227401
1 changed files with 11 additions and 5 deletions

14
mhd.cpp
View File

@ -177,8 +177,12 @@ int main()
try try
{ {
t.findCheapest("Nhttps://fit-wiki.cz/%C5%A1kola/p%C5%99edm%C4%9Bty/bi-pa2/pa2_zkou%C5%A1ka_2023-06-08= ""); t.findCheapest("Namesti Miru", "Terminal 2");
cout << "chyceno" << endl; assert(false);
}
catch (const logic_error &e)
{
assert(true);
} }
CPublicTransport t2; CPublicTransport t2;
@ -220,10 +224,11 @@ int main()
try try
{ {
t3.findCheapest("A", "Hd"); t3.findCheapest("A", "Hd");
assert(false);
} }
catch (const logic_error &e) catch (const logic_error &e)
{ {
assert(string(e.what()) != ""); assert(true);
} }
assert(t3.findCheapest("A", "E") == 1); assert(t3.findCheapest("A", "E") == 1);
@ -300,10 +305,11 @@ int main()
try try
{ {
t3.findCheapest("Orionka", "Andel"); t3.findCheapest("Orionka", "Andel");
assert(false);
} }
catch (const logic_error &e) catch (const logic_error &e)
{ {
assert(string(e.what()) != ""); assert(true);
} }
cout << "ALL ASSERTS PASSED!" << endl; cout << "ALL ASSERTS PASSED!" << endl;