From: Lucas Bajolet Date: Thu, 28 May 2015 21:10:31 +0000 (-0400) Subject: tests: Basic test for the allocation of NativeArray with short native values X-Git-Tag: v0.7.5~12^2 X-Git-Url: http://nitlanguage.org?hp=-c tests: Basic test for the allocation of NativeArray with short native values Signed-off-by: Lucas Bajolet --- b50f90be46675872672b5634fa9b06f731882208 diff --git a/tests/base_native_array.nit b/tests/base_native_array.nit new file mode 100644 index 0000000..e59c93e --- /dev/null +++ b/tests/base_native_array.nit @@ -0,0 +1,24 @@ +# 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. + +intrude import standard::collection::array + +var a = new Array[Bool] +var cpt = 0 +while cpt < 20 do + a.push(false) + cpt += 1 +end + +for i in a do i.output diff --git a/tests/sav/base_native_array.res b/tests/sav/base_native_array.res new file mode 100644 index 0000000..9486349 --- /dev/null +++ b/tests/sav/base_native_array.res @@ -0,0 +1,20 @@ +false +false +false +false +false +false +false +false +false +false +false +false +false +false +false +false +false +false +false +false