forked from steger/pr3-sose2026
24 lines
655 B
Haskell
24 lines
655 B
Haskell
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
|
|
|
|
{-# HLINT ignore "Avoid reverse" #-}
|
|
{-# HLINT ignore "Use void" #-}
|
|
|
|
import Data.Char (toUpper)
|
|
import Data.List (sort, sortOn)
|
|
import Test.HUnit
|
|
|
|
names = ["Oliver", "Emma", "Liam", "Ava", "Noah", "Sophia", "James", "Mia", "Elijah", "Isabella"]
|
|
|
|
ages = [25, 30, 22, 29, 35, 28, 40, 26, 33, 31]
|
|
|
|
-- we are looking for the UPPERCASE names of the two oldest persons whose names ends with an a sorted alphabetically"
|
|
|
|
extractedNames = []
|
|
|
|
test1 = Test.HUnit.TestCase (assertEqual "ExtractedNames" ["EMMA", "ISABELLA"] extractedNames)
|
|
|
|
tests = TestList [test1]
|
|
|
|
main :: IO ()
|
|
main = runTestTT test1 >> return ()
|