Package test.list.types

Examples of test.list.types.NineSeps


  }

  private void testNineSeps() {
    Module m = factory.makeModule_Default("m");
    Module m2 = factory.makeModule_Default("m2");
    NineSeps ns = factory.makeNineSeps(m, factory.makeNineSeps(m2));

    testAssert(
      ns.toTerm().isEqual(factory.getPureFactory().parse("[\"m\",1,2,3,4,5,6,7,8,9,\"m2\"]")),
      "many separated toTerm");
    testAssert(ns.reverse().isEqual(factory.makeNineSeps(m2, factory.makeNineSeps(m))), "many separated reverse");
    testAssert(ns.reverse().reverse().isEqual(ns), "reverse separated list test");

    try {
      ns.append((aterm.ATerm) m2);
      testAssert(false, "illegal call did not throw an exception");
    }
    catch (UnsupportedOperationException ex) {
      // this is what should happen
    }

    NineSeps ns2 = ns.append(m2);
    testAssert(
      ns2.isEqual(factory.NineSepsFromString("[\"m\",1,2,3,4,5,6,7,8,9,\"m2\",1,2,3,4,5,6,7,8,9,\"m2\"]")),
      "test append");
  }
View Full Code Here

TOP

Related Classes of test.list.types.NineSeps

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.