Exemplo n.º 1
0
 @BeforeClass
 public static void setUpBeforeClass() throws Exception {
   ErlideTestUtils.initProjects();
   // We set up projects here, it's quite costly
   final String name1 = "testproject1";
   erlProject = ErlideTestUtils.createProject(ErlideTestUtils.getTmpPath(name1), name1);
 }
Exemplo n.º 2
0
 @Before
 @Override
 public void setUp() throws Exception {
   super.setUp();
   module2 =
       ErlideTestUtils.createModule(project, "ww.erl", "% header\n-module(ww).\n% comment\n");
   module2.open(null);
   module4 =
       ErlideTestUtils.createModule(
           project, "ii.erl", "-module(ii).\n% fn\n-spec fn() ->ok.\nfn() ->\n    ok.\n");
   module4.open(null);
   module5 =
       ErlideTestUtils.createModule(
           project,
           "jj.erl",
           "-module(jj).\n% a\na()->\n    ok.\n-spec fn() ->ok." + "\n% fn\nfn() ->\n    ok.\n");
   module5.open(null);
 }
Exemplo n.º 3
0
 // boolean isHeader();
 @Test
 public void isHeader() throws Exception {
   final IErlModule module3 =
       ErlideTestUtils.createModule(
           project, "uu.erl", "-module(uu).\n% header too\n\n% comment\n");
   module3.open(null);
   final Collection<IErlComment> comments = module2.getComments();
   final Iterator<IErlComment> iterator = comments.iterator();
   final IErlComment comment = iterator.next();
   final IErlComment comment2 = iterator.next();
   final Collection<IErlComment> comments2 = module3.getComments();
   final Iterator<IErlComment> iterator2 = comments2.iterator();
   final IErlComment comment3 = iterator2.next();
   final IErlComment comment4 = iterator2.next();
   assertTrue(comment.isHeader());
   assertFalse(comment2.isHeader());
   assertTrue(comment3.isHeader());
   assertFalse(comment4.isHeader());
 }
Exemplo n.º 4
0
 @AfterClass
 public static void tearDownAfterClass() throws Exception {
   ErlideTestUtils.deleteProjects();
 }