# HG changeset patch # User jittat # Date 2009-04-19 01:46:57 # Node ID b65f8140956463b02ab41414f4ca5bd5be668054 # Parent c03ebf30fb10cc4118e8b665361f52aee8b3b999 fixed judge craching when some test case is not present git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@367 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/std-script/test_dsl.rb b/std-script/test_dsl.rb --- a/std-script/test_dsl.rb +++ b/std-script/test_dsl.rb @@ -113,12 +113,14 @@ end (1..(@runs.length-1)).each do |j| run = @runs[j] - run.tests.each do |t| - if test_present[t] == false - test_present[t] = true - else - puts "test #{t} is present in more than one run" - return false + if run.tests!=nil + run.tests.each do |t| + if test_present[t] == false + test_present[t] = true + else + puts "test #{t} is present in more than one run" + return false + end end end end