Search in sources :

Example 1 with PAxiom

use of de.be4.eventb.core.parser.node.PAxiom in project probparsers by bendisposto.

the class TheoriesIssuesTest method testCommentPredicates1.

@Test
public void testCommentPredicates1() throws Exception {
    final Start rootNode = parseInput("context C4 \naxioms\n@axm2 {1↦1,2↦2} = seqAppend({1↦1},2)\nend", false);
    final AContextParseUnit parseUnit = (AContextParseUnit) rootNode.getPParseUnit();
    final LinkedList<PAxiom> axioms = parseUnit.getAxioms();
    final AAxiom axiom = (AAxiom) axioms.get(0);
    assertEquals("{1↦1,2↦2} = seqAppend({1↦1},2)", axiom.getPredicate().getText());
}
Also used : Start(de.be4.eventb.core.parser.node.Start) AContextParseUnit(de.be4.eventb.core.parser.node.AContextParseUnit) AAxiom(de.be4.eventb.core.parser.node.AAxiom) PAxiom(de.be4.eventb.core.parser.node.PAxiom) Test(org.junit.Test)

Example 2 with PAxiom

use of de.be4.eventb.core.parser.node.PAxiom in project probparsers by bendisposto.

the class TheoriesIssuesTest method testCommentPredicates1.

@Test
public void testCommentPredicates1() throws Exception {
    final Start rootNode = parseInput("context C4 \naxioms\n@axm2 {1↦1,2↦2} = seqAppend({1↦1},2)\nend", false);
    final AContextParseUnit parseUnit = (AContextParseUnit) rootNode.getPParseUnit();
    final LinkedList<PAxiom> axioms = parseUnit.getAxioms();
    final AAxiom axiom = (AAxiom) axioms.get(0);
    assertEquals("{1↦1,2↦2} = seqAppend({1↦1},2)", axiom.getPredicate().getText());
}
Also used : Start(de.be4.eventbalg.core.parser.node.Start) AContextParseUnit(de.be4.eventbalg.core.parser.node.AContextParseUnit) AAxiom(de.be4.eventbalg.core.parser.node.AAxiom) PAxiom(de.be4.eventbalg.core.parser.node.PAxiom) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 AAxiom (de.be4.eventb.core.parser.node.AAxiom)1 AContextParseUnit (de.be4.eventb.core.parser.node.AContextParseUnit)1 PAxiom (de.be4.eventb.core.parser.node.PAxiom)1 Start (de.be4.eventb.core.parser.node.Start)1 AAxiom (de.be4.eventbalg.core.parser.node.AAxiom)1 AContextParseUnit (de.be4.eventbalg.core.parser.node.AContextParseUnit)1 PAxiom (de.be4.eventbalg.core.parser.node.PAxiom)1 Start (de.be4.eventbalg.core.parser.node.Start)1