wiki:JooPo testing

Version 3 (modified by schuhmac, 9 years ago) (diff)


JooPo testing

JooPo comes with a test package intended for developers that lets you separately try out certain parts of JooPo. Here we explain the classes in the test package.


TestMachine classfile
TestFlow classfile
TestStatement classfile
TestBlock classfile #Verbosefile verbosefile
TestLoop classfile #Verbosefile verbosefile

All operations just display the opcodes of the commands.

Test Machine

TestMachine simply expands the given class by a method.

Test Flow

TestFlow segments the methods' bodies into basic blocks of machine code.

Test Statement

TestStatement resolves the code towards expressions.

Test Block

TestBlock blockstructures the code. If recognized, block structure should be equivalent to the one found in a java source file. principal is the main block of a routine, subroutine k the kth subroutine. A script keeps a basic code block. The script numbers correspond to the intercept numbers displayed by the other test proglets. A loop is a simple loop, a stay an infinite loop. A conditional has blocks for all alternatives.

Test Loop

TestLoop discerns count loops. It can distinguish them from usual loops.

Verbose file

verbosefile is a filename to be .dot appended to. It keeps the structure hypothesis assumed as graphviz source. Nodes are intercepts, edges mean usual succession. Every node has its scope appended to the intercept. m stands for main, c for cycle and the cycle's end, b for branch and the branch's branching. Blue nodes are starts, red nodes are exits. Cyan edges are cycles, magenta edges are unites. Dashed edges violate scope. Green nodes are breaks.