From d958a3b8a9d8d86480e67ad87226cc3c35bb6670 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 8 Apr 2016 15:17:46 -0400 Subject: [PATCH] tests: add base_with_return.res Signed-off-by: Jean Privat --- tests/base_with_return.nit | 38 ++++++++++++++++++++++ tests/sav/base_with_return.res | 4 +++ tests/sav/nitc-common/fixme/base_with_return.res | 3 ++ 3 files changed, 45 insertions(+) create mode 100644 tests/base_with_return.nit create mode 100644 tests/sav/base_with_return.res create mode 100644 tests/sav/nitc-common/fixme/base_with_return.res diff --git a/tests/base_with_return.nit b/tests/base_with_return.nit new file mode 100644 index 0000000..2fc6f9d --- /dev/null +++ b/tests/base_with_return.nit @@ -0,0 +1,38 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# 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. + +import core::kernel + +class A + var a = 5 + fun start do + var a = new A + 1.output + end + fun finish do + var a = new A + 3.output + end +end + +fun foo +do + with new A do + 2.output + return + end +end + +foo +4.output diff --git a/tests/sav/base_with_return.res b/tests/sav/base_with_return.res new file mode 100644 index 0000000..94ebaf9 --- /dev/null +++ b/tests/sav/base_with_return.res @@ -0,0 +1,4 @@ +1 +2 +3 +4 diff --git a/tests/sav/nitc-common/fixme/base_with_return.res b/tests/sav/nitc-common/fixme/base_with_return.res new file mode 100644 index 0000000..e8a01cd --- /dev/null +++ b/tests/sav/nitc-common/fixme/base_with_return.res @@ -0,0 +1,3 @@ +1 +2 +4 -- 1.7.9.5