[Scummvm-cvs-logs] SF.net SVN: scummvm:[42027] tools/branches/gsoc2009-decompiler/decompiler/ test
kjdf at users.sourceforge.net
kjdf at users.sourceforge.net
Thu Jul 2 18:04:33 CEST 2009
Revision: 42027
http://scummvm.svn.sourceforge.net/scummvm/?rev=42027&view=rev
Author: kjdf
Date: 2009-07-02 16:04:32 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
decompiler: added missing node in one of test graphs
Modified Paths:
--------------
tools/branches/gsoc2009-decompiler/decompiler/test/data_graph.h
tools/branches/gsoc2009-decompiler/decompiler/test/test_graph_internal.h
Modified: tools/branches/gsoc2009-decompiler/decompiler/test/data_graph.h
===================================================================
--- tools/branches/gsoc2009-decompiler/decompiler/test/data_graph.h 2009-07-02 15:08:42 UTC (rev 42026)
+++ tools/branches/gsoc2009-decompiler/decompiler/test/data_graph.h 2009-07-02 16:04:32 UTC (rev 42027)
@@ -46,9 +46,10 @@
instructions.push_back(new CondJump("jumpif ", 9, -1));
instructions.push_back(new Jump("-4", 10, -4));
instructions.push_back(new CondJump("jumpif +2", 11, +2));
- instructions.push_back(new Jump("nop", 12, +1));
+ instructions.push_back(new CondJump("jumpif +2", 12, +2));
instructions.push_back(new Jump("nop", 13, +1));
- instructions.push_back(new Instruction("ret", 14 ));
+ instructions.push_back(new Jump("nop", 14, +1));
+ instructions.push_back(new Instruction("ret", 15 ));
ControlFlowGraph *g = new ControlFlowGraph;
g->addBlocksFromScript(instructions.begin(), instructions.end());
g->setEntry(1);
Modified: tools/branches/gsoc2009-decompiler/decompiler/test/test_graph_internal.h
===================================================================
--- tools/branches/gsoc2009-decompiler/decompiler/test/test_graph_internal.h 2009-07-02 15:08:42 UTC (rev 42026)
+++ tools/branches/gsoc2009-decompiler/decompiler/test/test_graph_internal.h 2009-07-02 16:04:32 UTC (rev 42027)
@@ -37,10 +37,8 @@
TS_ASSERT_EQUALS(addr(node(gb,8)->_interval), 8);
TS_ASSERT_EQUALS(addr(node(gb,9)->_interval), 8);
TS_ASSERT_EQUALS(addr(node(gb,10)->_interval), 8);
- TS_ASSERT_EQUALS(addr(node(gb,11)->_interval), 6);
- TS_ASSERT_EQUALS(addr(node(gb,12)->_interval), 6);
- TS_ASSERT_EQUALS(addr(node(gb,13)->_interval), 6);
- TS_ASSERT_EQUALS(addr(node(gb,14)->_interval), 6);
+ for (int i = 11; i <= 15; i++)
+ TS_ASSERT_EQUALS(addr(node(gb,i)->_interval), 6);
gc->intervals();
TS_ASSERT_EQUALS(addr(node(gc,1)->_interval), 1);
@@ -64,10 +62,10 @@
gb->extendIntervals();
for (int i = 1; i <= 5; i++)
TS_ASSERT_EQUALS(addr(node(gb,i)->_interval), 1);
- for (int i = 6; i <= 14; i++)
+ for (int i = 6; i <= 15; i++)
TS_ASSERT_EQUALS(addr(node(gb,i)->_interval), 6);
gb->extendIntervals();
- for (int i = 1; i <= 14; i++)
+ for (int i = 1; i <= 15; i++)
TS_ASSERT_EQUALS(addr(node(gb,i)->_interval), 1);
gc->intervals();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list