    module Language.Futhark.SemanticTests (tests) where

    import Language.Futhark (ImportName (..))
    import Language.Futhark.Semantic
    import Test.Tasty
    import Test.Tasty.HUnit

    tests :: TestTree
    tests :: TestTree
    tests =
      TestName -> [TestTree] -> TestTree
    testGroup
        TestName
    "Semantic objects"
        [ TestName -> Assertion -> TestTree
    testCase TestName
    "a" (Assertion -> TestTree) -> Assertion -> TestTree
    forall a b. (a -> b) -> a -> b
    $
            TestName -> ImportName
    mkInitialImport TestName
    "a" ImportName -> ImportName -> Assertion
    forall a. (Eq a, Show a, HasCallStack) => a -> a -> Assertion
    @?= TestName -> ImportName
    ImportName TestName
    "a",
          TestName -> Assertion -> TestTree
    testCase TestName
    "./a" (Assertion -> TestTree) -> Assertion -> TestTree
    forall a b. (a -> b) -> a -> b
    $
            TestName -> ImportName
    mkInitialImport TestName
    "./a" ImportName -> ImportName -> Assertion
    forall a. (Eq a, Show a, HasCallStack) => a -> a -> Assertion
    @?= TestName -> ImportName
    ImportName TestName
    "a",
          TestName -> Assertion -> TestTree
    testCase TestName
    "a/b -> ../c" (Assertion -> TestTree) -> Assertion -> TestTree
    forall a b. (a -> b) -> a -> b
    $
            ImportName -> TestName -> ImportName
    mkImportFrom (TestName -> ImportName
    mkInitialImport TestName
    "a/b") TestName
    "../c" ImportName -> ImportName -> Assertion
    forall a. (Eq a, Show a, HasCallStack) => a -> a -> Assertion
    @?= TestName -> ImportName
    ImportName TestName
    "c",
          TestName -> Assertion -> TestTree
    testCase TestName
    "a/b -> ../../c" (Assertion -> TestTree) -> Assertion -> TestTree
    forall a b. (a -> b) -> a -> b
    $
            ImportName -> TestName -> ImportName
    mkImportFrom (TestName -> ImportName
    mkInitialImport TestName
    "a/b") TestName
    "../../c" ImportName -> ImportName -> Assertion
    forall a. (Eq a, Show a, HasCallStack) => a -> a -> Assertion
    @?= TestName -> ImportName
    ImportName TestName
    "../c",
          TestName -> Assertion -> TestTree
    testCase TestName
    "../a -> b" (Assertion -> TestTree) -> Assertion -> TestTree
    forall a b. (a -> b) -> a -> b
    $
            ImportName -> TestName -> ImportName
    mkImportFrom (TestName -> ImportName
    mkInitialImport TestName
    "../a") TestName
    "b" ImportName -> ImportName -> Assertion
    forall a. (Eq a, Show a, HasCallStack) => a -> a -> Assertion
    @?= TestName -> ImportName
    ImportName TestName
    "../b",
          TestName -> Assertion -> TestTree
    testCase TestName
    "../a -> ../b" (Assertion -> TestTree) -> Assertion -> TestTree
    forall a b. (a -> b) -> a -> b
    $
            ImportName -> TestName -> ImportName
    mkImportFrom (TestName -> ImportName
    mkInitialImport TestName
    "../a") TestName
    "../b" ImportName -> ImportName -> Assertion
    forall a. (Eq a, Show a, HasCallStack) => a -> a -> Assertion
    @?= TestName -> ImportName
    ImportName TestName
    "../../b"
        ]