From 9548440949e1776eea3226f849c43125fdef1557 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 20 Jul 2018 20:10:12 +0300 Subject: [PATCH] remove old tests those normalisation tests are now to_vool tests --- test/vool/normalization/helper.rb | 13 ----- test/vool/normalization/test_assignment.rb | 42 ----------------- .../vool/normalization/test_send_statement.rb | 47 ------------------- 3 files changed, 102 deletions(-) delete mode 100644 test/vool/normalization/helper.rb delete mode 100644 test/vool/normalization/test_assignment.rb delete mode 100644 test/vool/normalization/test_send_statement.rb diff --git a/test/vool/normalization/helper.rb b/test/vool/normalization/helper.rb deleted file mode 100644 index d1c0fb05..00000000 --- a/test/vool/normalization/helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -require_relative "../helper" - -module Vool - module Norm - - class NormTest < MiniTest::Test - - def normalize(input) - RubyX::RubyCompiler.compile(input).normalize - end - end - end -end diff --git a/test/vool/normalization/test_assignment.rb b/test/vool/normalization/test_assignment.rb deleted file mode 100644 index 715dc148..00000000 --- a/test/vool/normalization/test_assignment.rb +++ /dev/null @@ -1,42 +0,0 @@ -require_relative "helper" - -module Vool - module Norm - - class TestAssignSend < NormTest - def setup - super - @stm = normalize("a = foo(1 - 2)") - end - def test_many - assert_equal Statements , @stm.class - end - def test_assignment - assert_equal LocalAssignment , @stm.first.class - end - def test_assignment_value - assert_equal SendStatement , @stm.first.value.class - end - def test_assignment_method - assert_equal :- , @stm.first.value.name - end - def test_length - assert_equal 2 , @stm.length - end - def test_name - assert @stm.first.name.to_s.start_with?("tmp_") , @stm.first.name - end - def test_assignment2 - assert_equal LocalAssignment , @stm.last.class - end - def test_name - assert_equal :a , @stm.last.name - end - def test_assignment_method2 - assert_equal :foo , @stm.last.value.name - end - - end - - end -end diff --git a/test/vool/normalization/test_send_statement.rb b/test/vool/normalization/test_send_statement.rb deleted file mode 100644 index d58133b9..00000000 --- a/test/vool/normalization/test_send_statement.rb +++ /dev/null @@ -1,47 +0,0 @@ -require_relative "helper" - -module Vool - module Norm - - class TestSendSimple < NormTest - def test_simple - lst = normalize("foo") - assert_equal SendStatement , lst.class - end - def test_constant_args - lst = normalize("foo(1,2)") - assert_equal SendStatement , lst.class - end - end - class TestSendSend < NormTest - def setup - super - @stm = normalize("foo(1 - 2)") - end - def test_many - assert_equal Statements , @stm.class - end - def test_assignment - assert_equal LocalAssignment , @stm.first.class - end - def test_name - assert @stm.first.name.to_s.start_with?("tmp_") , @stm.first.name - end - def test_assigned - assert_equal SendStatement , @stm.first.value.class - end - def test_length - assert_equal 2 , @stm.length - end - def test_last_class - assert_equal SendStatement , @stm.last.class - end - def test_last_arg - assert_equal LocalVariable , @stm.last.arguments.first.class - end - def test_last_send - assert_equal :foo , @stm.last.name - end - end - end -end