From 277a5490f59865d2727072ef843187c7cd8c1f0f Mon Sep 17 00:00:00 2001 From: Hongbo Zhang Date: Thu, 13 Jun 2024 09:35:05 +0800 Subject: [PATCH 1/2] try blackbox test --- int/test/moon.pkg.json | 3 +++ int/test/test.mbt | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 int/test/moon.pkg.json create mode 100644 int/test/test.mbt diff --git a/int/test/moon.pkg.json b/int/test/moon.pkg.json new file mode 100644 index 000000000..0b366f17f --- /dev/null +++ b/int/test/moon.pkg.json @@ -0,0 +1,3 @@ +{ + "import": ["moonbitlang/core/builtin", "moonbitlang/core/coverage", "moonbitlang/core/int"] +} diff --git a/int/test/test.mbt b/int/test/test.mbt new file mode 100644 index 000000000..c731d02e8 --- /dev/null +++ b/int/test/test.mbt @@ -0,0 +1,20 @@ +// Copyright 2024 International Digital Economy Academy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +test "fromint" { + inspect(Int::from_int(3), content="3")? + inspect(Int::signum(3), content="1")? + inspect(Int::signum(-3), content="-1")? + inspect(Int::signum(0), content="0")? +} \ No newline at end of file From f4a7cc36931da6e78dd58a71c43cd99298c68171 Mon Sep 17 00:00:00 2001 From: Hongbo Zhang Date: Thu, 13 Jun 2024 09:41:17 +0800 Subject: [PATCH 2/2] update --- int/test/test.mbt | 2 +- int/test/test.mbti | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 int/test/test.mbti diff --git a/int/test/test.mbt b/int/test/test.mbt index c731d02e8..cc7828d58 100644 --- a/int/test/test.mbt +++ b/int/test/test.mbt @@ -17,4 +17,4 @@ test "fromint" { inspect(Int::signum(3), content="1")? inspect(Int::signum(-3), content="-1")? inspect(Int::signum(0), content="0")? -} \ No newline at end of file +} diff --git a/int/test/test.mbti b/int/test/test.mbti new file mode 100644 index 000000000..bb72e57e0 --- /dev/null +++ b/int/test/test.mbti @@ -0,0 +1,10 @@ +package moonbitlang/core/int/test + +// Values + +// Types and methods + +// Traits + +// Extension Methods +