Exemplo n.º 1
0
 public final void testTypeProposal2() {
   final String s = "context ";
   ctx =
       (ExecutionContextImpl)
           FastAnalyzer.computeExecutionContext(s, ctx, new ArrayList<Extension>());
   assertEquals(Partition.TYPE_DECLARATION, CheckFastAnalyzer.computePartition(s));
 }
Exemplo n.º 2
0
  public final void testExpressionProposal1() {
    final String s = "context String if ";
    ctx = (ExecutionContextImpl) CheckFastAnalyzer.computeExecutionContext(s, ctx);
    assertEquals(Partition.EXPRESSION, CheckFastAnalyzer.computePartition(s));

    final List<Object> ps = getProposals(s);
    assertTrue(!ps.isEmpty());
    assertTrue(containsProposal(ps, "this", ctx.getStringType()));
  }