Ejemplo n.º 1
0
  @Test
  public void testSingleFileSingleLineEmptyComment() {
    final int bugId = 102716;
    Assert.assertTrue(this.p.hasBug(bugId));
    Assert.assertEquals(1, this.p.getBug(bugId).getFiles().size());

    final File firstFile = this.p.getBug(bugId).getFiles().get(0);
    Assert.assertEquals(1, firstFile.getLines().size());

    final Line firstLine = firstFile.getLines().get(0);
    Assert.assertEquals(1182, firstLine.getLine());
    Assert.assertEquals(Suspiciousness.HIGH, firstLine.getSuspiciousness());
    Assert.assertEquals("", firstLine.getComment());
  }
Ejemplo n.º 2
0
  @Test
  public void testSingleFileSingleLineMissingSuspiciousness() {
    final int bugId = 102719;
    Assert.assertTrue(this.p.hasBug(bugId));
    Assert.assertEquals(1, this.p.getBug(bugId).getFiles().size());

    final File firstFile = this.p.getBug(bugId).getFiles().get(0);
    Assert.assertEquals(1, firstFile.getLines().size());

    final Line firstLine = firstFile.getLines().get(0);
    Assert.assertEquals(1182, firstLine.getLine());
    Assert.assertEquals(Suspiciousness.UNKNOWN, firstLine.getSuspiciousness());
    Assert.assertEquals("added new else if branch", firstLine.getComment());
  }