Update Proj.hs

This commit is contained in:
s464986 2024-05-27 16:18:49 +02:00
parent 9fe11d317d
commit 4226a38603

View File

@ -111,13 +111,13 @@ addNewDishes path = do
testSuggestMeals :: Test
testSuggestMeals =
TestList
[ "Test suggestMeals for empty dish list"
[ "Test suggestMeals for not exist list"
~: do
let csvFile = "empty.csv"
result <- tryJust (guard . isDoesNotExistError) $ readCSV csvFile
case result of
Left _ -> return () -- Test zakończy się powodzeniem, jeśli otrzymamy Left
Right _ -> assertFailure ("Test suggestMeals for empty dish list with file " ++ csvFile ++ ": should have failed to read CSV file"),
Left _ -> return ()
Right _ -> assertFailure ("Test suggestMeals for not exist list with file " ++ csvFile ++ ": should have failed to read CSV file"),
"Test suggestMeals for non-empty dish list"
~: do
let csvFile = "baza.csv"