lib/take/unit/generator.rb in take-0.0.10 vs lib/take/unit/generator.rb in take-0.0.11
- old
+ new
@@ -74,20 +74,24 @@
def walk_test(node)
@output << <<-CODE
void test_#{group_name(node)}()
{
tests++;
- int test_success = 1;
+ int test_skip = 0, test_success = 1;
output(TEXT_COLOR_MAGENTA "\\t\\tTEST \\"" TEXT_COLOR_BOLD_MAGENTA
"#{node.name}" TEXT_COLOR_MAGENTA "\\": ");
CODE
befores.each { |child| walk(child) }
node.children.select(&:block?).each { |child| walk(child) }
afters.each { |child| walk(child) }
@output << <<-CODE
- if(test_success)
+ if(test_skip)
+ {
+ output(TEXT_COLOR_BOLD_YELLOW "PASS\\n");
+ }
+ else if(test_success)
{
#ifdef VERBOSE
output("\\n\\t\\t\\t" TEXT_COLOR_GREEN "OK\\n");
#else
output(TEXT_COLOR_BOLD_GREEN "OK\\n");