Search in sources :

Example 1 with Target

use of claw.tatsu.common.Target in project claw-compiler by C2SM-RCM.

the class ClawPragmaTest method assertTargets.

/**
 * Assert the information sorted in the target list.
 *
 * @param l       The current ClawPragma object.
 * @param targets List of expected targets.
 */
private void assertTargets(ClawPragma l, List<Target> targets) {
    if (targets != null && targets.size() > 0) {
        assertTrue(l.hasClause(ClawClause.TARGET));
        assertEquals(targets.size(), l.getTargetClauseValues().size());
        for (Target t : targets) {
            assertTrue(l.getTargetClauseValues().contains(t));
        }
    } else {
        assertFalse(l.hasClause(ClawClause.TARGET));
    }
}
Also used : Target(claw.tatsu.common.Target)

Aggregations

Target (claw.tatsu.common.Target)1