From 22727ba1505983bf958004b041d35378938eefb0 Mon Sep 17 00:00:00 2001 From: Torsten Date: Thu, 26 Mar 2020 20:30:47 +0200 Subject: [PATCH] arm tests back on line --- test/mains/test_arm.rb | 2 +- test/mains/test_new.rb | 2 +- test/mains/test_while.rb | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 test/mains/test_while.rb diff --git a/test/mains/test_arm.rb b/test/mains/test_arm.rb index 150b5f65..b44e7abf 100644 --- a/test/mains/test_arm.rb +++ b/test/mains/test_arm.rb @@ -41,7 +41,7 @@ module Mains if `uname -a`.include?("torsten") @linker = "arm-linux-gnu-ld" #on fedora end - return false #Disabling for a moment unless ENV["TEST_ARM"] + return unless ENV["TEST_ARM"] or ENV["TEST_ALL"] begin `#{@qemu} -version` `#{@linker} -v` diff --git a/test/mains/test_new.rb b/test/mains/test_new.rb index accbd525..ead6b017 100644 --- a/test/mains/test_new.rb +++ b/test/mains/test_new.rb @@ -4,7 +4,7 @@ require_relative 'helper' # mains dir. # If you just pop a file in the source directory, all tests will run. # This is fine if all is fine. But if all is fine, you are not developing, just playing. -# So when you really need to itereate editing this gives guard auto-run and just of that +# So when you really need to iterate editing this gives guard auto-run and just of that # one test that you work on. # After getting the test to run, copy paste the whole code into a file in source and revert diff --git a/test/mains/test_while.rb b/test/mains/test_while.rb new file mode 100644 index 00000000..c63ff571 --- /dev/null +++ b/test/mains/test_while.rb @@ -0,0 +1,13 @@ +require_relative "helper" + +module Mains + class WhileTester < MiniTest::Test + include MainsHelper + + def test_while + @preload = "Integer.gt;Integer.plus" + @input = as_main 'a = -1; while( 0 > a); a = 1 + a;end;return a' + assert_result 0 , "" + end + end +end