From 422c0759154a5d18a3f8f2158027eb68faeda373 Mon Sep 17 00:00:00 2001 From: Yichen Wang <18348405+Aiee@users.noreply.github.com> Date: Sun, 22 Aug 2021 23:19:35 +0800 Subject: [PATCH] Add tests of parsing string to int (#1337) * Add tests of parsing string to int * Update workflow --- .github/workflows/pull_request.yml | 9 +++++++++ .../features/expression/function/TypeConversion.feature | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index effcb0d4a..cb3c8837c 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -91,8 +91,11 @@ jobs: -DCMAKE_CXX_COMPILER=$TOOLSET_DIR/bin/g++ \ -DCMAKE_C_COMPILER=$TOOLSET_DIR/bin/gcc \ -DCMAKE_BUILD_TYPE=Release \ + -DNEBULA_COMMON_REPO_TAG=${{ steps.tag.outputs.tag }} \ + -DNEBULA_STORAGE_REPO_TAG=${{ steps.tag.outputs.tag }} \ -DENABLE_TESTING=on \ -DENABLE_BUILD_STORAGE=on \ + -DENABLE_MODULE_FORCE_CHECKOUT=off \ -B build echo "::set-output name=j::10" ;; @@ -102,8 +105,11 @@ jobs: -DCMAKE_CXX_COMPILER=$TOOLSET_DIR/bin/g++ \ -DCMAKE_C_COMPILER=$TOOLSET_DIR/bin/gcc \ -DCMAKE_BUILD_TYPE=Debug \ + -DNEBULA_COMMON_REPO_TAG=${{ steps.tag.outputs.tag }} \ + -DNEBULA_STORAGE_REPO_TAG=${{ steps.tag.outputs.tag }} \ -DENABLE_TESTING=on \ -DENABLE_BUILD_STORAGE=on \ + -DENABLE_MODULE_FORCE_CHECKOUT=off \ -B build echo "::set-output name=j::10" ;; @@ -115,9 +121,12 @@ jobs: -DCMAKE_CXX_COMPILER=$TOOLSET_DIR/bin/clang++ \ -DCMAKE_C_COMPILER=$TOOLSET_DIR/bin/clang \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DNEBULA_COMMON_REPO_TAG=${{ steps.tag.outputs.tag }} \ + -DNEBULA_STORAGE_REPO_TAG=${{ steps.tag.outputs.tag }} \ -DENABLE_ASAN=on \ -DENABLE_TESTING=on \ -DENABLE_BUILD_STORAGE=on \ + -DENABLE_MODULE_FORCE_CHECKOUT=off \ -B build echo "::set-output name=j::6" ;; diff --git a/tests/tck/features/expression/function/TypeConversion.feature b/tests/tck/features/expression/function/TypeConversion.feature index aeac95b01..7ee531213 100644 --- a/tests/tck/features/expression/function/TypeConversion.feature +++ b/tests/tck/features/expression/function/TypeConversion.feature @@ -59,11 +59,12 @@ Feature: TypeConversion Expression When executing query: """ YIELD [toInteger(true), toInteger(false), toInteger(1), toInteger(3.14), - toInteger("trUe"), toInteger("3.14"), toInteger(null)] AS yield_toInteger + toInteger("trUe"), toInteger("3.14"), toInteger(null), toInteger("1e3"), + toInteger("1E3"), toInteger("1.5E4")] AS yield_toInteger """ Then the result should be, in any order: - | yield_toInteger | - | [BAD_TYPE, BAD_TYPE, 1, 3, NULL, 3, NULL] | + | yield_toInteger | + | [BAD_TYPE, BAD_TYPE, 1, 3, NULL, 3, NULL, 1000, 1000, 15000] | When executing query: """ UNWIND [true, false, 1, 3.14, "trUe", "3.14", null] AS b