6162636465666768697071
r.setWriter( new PrintWriter( s ) ); ATermAppl C = term( "C" ); ATermAppl p = term( "p" ); r.visit( all( p, C ) ); String expected = "(p only C)"; String actual = s.toString(); assertEquals( expected, actual );
7980818283848586878889
ATermAppl C = term( "C" ); ATermAppl D = term( "D" ); ATermAppl E = term( "E" ); r.visit( and( C, D, E ) ); String expected = "(C and D and E)"; String actual = s.toString(); assertEquals( expected, actual );
96979899100101102103104105106
r.setWriter( new PrintWriter( s ) ); ATermAppl l = literal( "foobar" ); ATermAppl p = term( "p" ); r.visit( hasValue( p, l ) ); String expected = "(p value \"foobar\")"; String actual = s.toString(); assertEquals( expected, actual );
112113114115116117118119120121122
ATermRenderer r = new ATermManchesterSyntaxRenderer(); r.setWriter( new PrintWriter( s ) ); ATermAppl p = term( "p" ); r.visit( inv( p ) ); String expected = "inverse p"; String actual = s.toString(); assertEquals( expected, actual );
129130131132133134135136137138139
r.setWriter( new PrintWriter( s ) ); ATermAppl C = term( "C" ); ATermAppl p = term( "p" ); r.visit( max( p, 3, C ) ); String expected = "(p max 3 C)"; String actual = s.toString(); assertEquals( expected, actual );
146147148149150151152153154155156
r.setWriter( new PrintWriter( s ) ); ATermAppl C = term( "C" ); ATermAppl p = term( "p" ); r.visit( min( p, 3, C ) ); String expected = "(p min 3 C)"; String actual = s.toString(); assertEquals( expected, actual );
162163164165166167168169170171172
ATermRenderer r = new ATermManchesterSyntaxRenderer(); r.setWriter( new PrintWriter( s ) ); ATermAppl C = term( "C" ); r.visit( not( C ) ); String expected = "not C"; String actual = s.toString(); assertEquals( expected, actual );
180181182183184185186187188189190
ATermAppl C = term( "C" ); ATermAppl D = term( "D" ); ATermAppl E = term( "E" ); r.visit( oneOf( C, D, E ) ); // oneOf inserts new list elements on top of the list String expected = "{E D C}"; String actual = s.toString();
199200201202203204205206207208209
ATermAppl C = term( "C" ); ATermAppl D = term( "D" ); ATermAppl E = term( "E" ); r.visit( or( C, D, E ) ); String expected = "(C or D or E)"; String actual = s.toString(); assertEquals( expected, actual );
215216217218219220221222223224225
ATermRenderer r = new ATermManchesterSyntaxRenderer(); r.setWriter( new PrintWriter( s ) ); ATermAppl p = term( "p" ); r.visit( self( p ) ); String expected = "(p Self)"; String actual = s.toString(); assertEquals( expected, actual );