[Scummvm-cvs-logs] SF.net SVN: scummvm:[50566] tools/branches/gsoc2010-decompiler/decompiler/ test/cfg_test.h
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Thu Jul 1 21:41:51 CEST 2010
Revision: 50566
http://scummvm.svn.sourceforge.net/scummvm/?rev=50566&view=rev
Author: pidgeot
Date: 2010-07-01 19:41:50 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Add test of short-circuit detection
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h
Modified: tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h 2010-07-01 19:40:16 UTC (rev 50565)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h 2010-07-01 19:41:50 UTC (rev 50566)
@@ -113,4 +113,16 @@
TS_ASSERT(gr->_start->_address == 6);
TS_ASSERT(boost::in_degree(*it, g) == 2 && boost::out_degree(*it, g) == 0);
}
+
+ void testShortCircuitDetection() {
+ Scumm::v6::Engine *engine = new Scumm::v6::Engine();
+ Disassembler *d = engine->getDisassembler();
+ d->open("decompiler/test/short-circuit.dmp");
+ std::vector<Instruction> insts = d->disassemble();
+ delete d;
+ ControlFlow *c = new ControlFlow(insts, engine);
+ c->createGroups();
+ Graph g = c->getGraph();
+ TS_ASSERT(boost::num_vertices(g) == 3);
+ }
};
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