Skip to content

Commit

Permalink
Test bugs due to change in t_depends schema.
Browse files Browse the repository at this point in the history
	modified:   tc_meta.rb
	modified:   tc_rebl.rb
  • Loading branch information
sriram-srinivasan committed Mar 11, 2012
1 parent b3c5229 commit 2547150
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/tc_meta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_paths

tally = 0
program.t_depends.each do |dep|
next if VizUtil.ma_tables.keys.include? dep[1].to_sym
next if VizUtil.ma_tables.keys.include? dep.lhs.to_sym
if dep.lhs == "shortest" and dep.body == "path"
assert(dep.nm, "NM rule")
tally += 1
Expand Down Expand Up @@ -356,7 +356,7 @@ def test_theta

p = ThetaMonotoneJoin.new
p.t_depends.each do |dep|
next if VizUtil.ma_tables.keys.include? dep[1].to_sym
next if VizUtil.ma_tables.keys.include? dep.lhs.to_sym
assert(!dep.nm, "this dependency should't be marked nonmonotonic: #{dep.inspect}")
end
end
Expand Down
6 changes: 3 additions & 3 deletions test/tc_rebl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def test_rebl_shortestpaths

# Declarations
rt.exec_rebl("table :link, [:from, :to, :cost]")
rt.exec_rebl("table :path, [:from, :to, :next, :cost]")
rt.exec_rebl("table :path, [:from, :to, :nxt, :cost]")

# Check lscollections
expected_output = "1: table :link, [:from, :to, :cost]\n2: table :path, [:from, :to, :next, :cost]\n"
expected_output = "1: table :link, [:from, :to, :cost]\n2: table :path, [:from, :to, :nxt, :cost]\n"
actual_output = rt.exec_rebl("/lscollections")
assert_equal(expected_output, actual_output)

Expand Down Expand Up @@ -166,7 +166,7 @@ def test_rebl_shortestpaths
assert_equal(expected_output, actual_output)

# Add a new collection and rule for shortest paths, and tick
rt.exec_rebl("table :shortest, [:from, :to] => [:next, :cost]")
rt.exec_rebl("table :shortest, [:from, :to] => [:nxt, :cost]")
rt.exec_rebl("shortest <= path.argmin([path.from, path.to], path.cost)")
rt.exec_rebl("/tick")

Expand Down

0 comments on commit 2547150

Please sign in to comment.