From 063c517f3c99aa34ebf5ce25a97d85bb05d7abe4 Mon Sep 17 00:00:00 2001 From: krangelov Date: Wed, 22 Sep 2021 14:11:11 +0200 Subject: [PATCH] more tests for variants --- testsuite/compiler/compute/Variants.gfs | 10 ++++++++++ testsuite/compiler/compute/Variants.gfs.gold | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/testsuite/compiler/compute/Variants.gfs b/testsuite/compiler/compute/Variants.gfs index 1f512694c..f65427e88 100644 --- a/testsuite/compiler/compute/Variants.gfs +++ b/testsuite/compiler/compute/Variants.gfs @@ -1,2 +1,12 @@ i -retain testsuite/compiler/compute/Variants.gf cc hello +cc <\x -> x++x : Str -> Str> ("a"|"b") +cc <\x -> x : Str -> Str> ("a"|"b") +cc <\x -> "c" : Str -> Str> ("a"|"b") +cc +cc +cc +cc <\x -> x.p1++x.p1 : Str*Str -> Str> <"a"|"b","c"> +cc <\x -> x.p1 : Str*Str -> Str> <"a"|"b","c"> +cc <\x -> x.p2++x.p2 : Str*Str -> Str> <"a"|"b","c"> +cc <\x -> x.p2 : Str*Str -> Str> <"a"|"b","c"> diff --git a/testsuite/compiler/compute/Variants.gfs.gold b/testsuite/compiler/compute/Variants.gfs.gold index cd74b1c23..50af5e513 100644 --- a/testsuite/compiler/compute/Variants.gfs.gold +++ b/testsuite/compiler/compute/Variants.gfs.gold @@ -1 +1,11 @@ variants {"hello"; "hello" ++ "hello"} +variants {"a" ++ "a"; "b" ++ "b"} +variants {"a"; "b"} +"c" +variants {"a"; "b"} ++ variants {"a"; "b"} +variants {"a"; "b"} +"c" +variants {"a"; "b"} ++ variants {"a"; "b"} +variants {"a"; "b"} +"c" ++ "c" +"c"