From 6e6ce2deee9fedafa949c770045d528b8ec8a67f Mon Sep 17 00:00:00 2001 From: Emil Valeev Date: Sat, 28 Dec 2024 21:36:34 +0500 Subject: [PATCH] feat(e2e,version): bump to 29.1 AND add e2e for the fix from prev commit --- e2e/classify_int/README.md | 1 + e2e/classify_int/neva.yml | 1 + e2e/classify_int/src/main.neva | 15 +++++++++++++++ e2e/classify_int/src/utils/utils.neva | 6 ++++++ pkg/version.go | 2 +- 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 e2e/classify_int/README.md create mode 100644 e2e/classify_int/neva.yml create mode 100644 e2e/classify_int/src/main.neva create mode 100644 e2e/classify_int/src/utils/utils.neva diff --git a/e2e/classify_int/README.md b/e2e/classify_int/README.md new file mode 100644 index 00000000..3e6ff634 --- /dev/null +++ b/e2e/classify_int/README.md @@ -0,0 +1 @@ +This e2e test was added because of https://github.com/nevalang/neva/issues/816 \ No newline at end of file diff --git a/e2e/classify_int/neva.yml b/e2e/classify_int/neva.yml new file mode 100644 index 00000000..283bd401 --- /dev/null +++ b/e2e/classify_int/neva.yml @@ -0,0 +1 @@ +neva: 0.29.0 \ No newline at end of file diff --git a/e2e/classify_int/src/main.neva b/e2e/classify_int/src/main.neva new file mode 100644 index 00000000..93b4cbf2 --- /dev/null +++ b/e2e/classify_int/src/main.neva @@ -0,0 +1,15 @@ +import { + fmt + @:src/utils +} + +def Main(start any) (stop any) { + classify utils.ClassifyInt + println1 fmt.Println + println2 fmt.Println + --- + :start -> -42 -> classify + classify:pos -> 'positive :)' -> println1 + classify:neg -> 'negative :(' -> println2 + [println1, println2] -> :stop +} diff --git a/e2e/classify_int/src/utils/utils.neva b/e2e/classify_int/src/utils/utils.neva new file mode 100644 index 00000000..be91fc62 --- /dev/null +++ b/e2e/classify_int/src/utils/utils.neva @@ -0,0 +1,6 @@ +pub def ClassifyInt(data int) (neg any, pos any) { + (:data >= 0) -> switch { + true -> :pos + _ -> :neg + } +} \ No newline at end of file diff --git a/pkg/version.go b/pkg/version.go index 2d93ae59..b63bd065 100644 --- a/pkg/version.go +++ b/pkg/version.go @@ -2,4 +2,4 @@ package pkg // Version is the current version of the language and stdlib. // Don't forget to update it before release new tag. -var Version = "0.29.0" //nolint:gochecknoglobals +var Version = "0.29.1" //nolint:gochecknoglobals