Sha256: 35cd498f3fd9f379a457239da2461717e63d411ddb0cb9193f0c6e9fd9beb77d
Contents?: true
Size: 1.21 KB
Versions: 13
Compression:
Stored size: 1.21 KB
Contents
# # testing ruote # # Thu May 21 15:29:48 JST 2009 # require File.join(File.dirname(__FILE__), '..', 'test_helper.rb') require 'ruote/engine/process_status' class TreeTest < Test::Unit::TestCase def test_decompose_tree assert_equal( {"0"=>["define", {"name"=>"nada"}], "0_0"=>["sequence", {}], "0_0_0"=>["alpha", {}], "0_0_1"=>["bravo", {}]}, Ruote.decompose_tree( ["define", {"name"=>"nada"}, [ ["sequence", {}, [["alpha", {}, []], ["bravo", {}, []]]] ]])) end def test_decompose_sub_tree assert_equal( {"0_1"=>["define", {"name"=>"nada"}], "0_1_0"=>["sequence", {}], "0_1_0_0"=>["alpha", {}], "0_1_0_1"=>["bravo", {}]}, Ruote.decompose_tree( ["define", {"name"=>"nada"}, [ ["sequence", {}, [["alpha", {}, []], ["bravo", {}, []]]] ]], '0_1')) end def test_recompose_tree assert_equal( ["define", {"name"=>"nada"}, [ ["sequence", {}, [["alpha", {}, []], ["bravo", {}, []]]] ]], Ruote.recompose_tree( {"0"=>["define", {"name"=>"nada"}], "0_0"=>["sequence", {}], "0_0_0"=>["alpha", {}], "0_0_1"=>["bravo", {}]})) end end
Version data entries
13 entries across 13 versions & 2 rubygems