@@ -29,6 +29,7 @@ import Data.Text hiding (map)
2929import qualified Data.Text as T
3030import Data.Time.Clock.POSIX hiding (getCurrentTime)
3131import Data.Time.Clock (getCurrentTime)
32+import Data.Time.Calendar (fromGregorian)
3233
3334main :: IO ()
3435main = do
@@ -157,7 +158,9 @@ main = do
157158 ("x:=relation{tuple{a Left 3}}", Left (TypeConstructorTypeVarsMismatch (S.fromList ["a","b"]) (S.fromList ["a"]))), -- Left 3, alone is not enough information to imply the type
158159 ("x:=relation{a Either Integer Text}{tuple{a Left 3}}", mkRelationFromList simpleEitherIntTextAttributes [[ConstructedAtom "Left" (eitherAtomType IntegerAtomType TextAtomType) [IntegerAtom 3]]]),
159160 --test datetime constructor
160− ("x:=relation{tuple{a dateTimeFromEpochSeconds(1495199790)}}", mkRelationFromList (A.attributesFromList [Attribute "a" DateTimeAtomType]) [[DateTimeAtom (posixSecondsToUTCTime(realToFrac (1495199790 :: Int)))]])
161+ ("x:=relation{tuple{a dateTimeFromEpochSeconds(1495199790)}}", mkRelationFromList (A.attributesFromList [Attribute "a" DateTimeAtomType]) [[DateTimeAtom (posixSecondsToUTCTime(realToFrac (1495199790 :: Int)))]]),
162+ --test Day constructor
163+ ("x:=relation{tuple{a fromGregorian(2017,05,30)}}", mkRelationFromList (A.attributesFromList [Attribute "a" DayAtomType]) [[DayAtom (fromGregorian 2017 05 30)]])
161164 ]
162165
163166assertTutdEqual :: DatabaseContext -> Either RelationalError Relation -> Text -> Assertion