Changeset 871

Show
Ignore:
Timestamp:
10/22/07 09:35:03 (1 year ago)
Author:
asterite
Message:

Made all the completion tests pass (except one, which isn't that important).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/descent.core/src/descent/internal/codeassist/complete/CompletionParser.java

    r870 r871  
    165165     
    166166    private boolean inCompletion() { 
    167         return prevToken.ptr + prevToken.sourceLen <= cursorLocation && cursorLocation <= token.ptr 
     167        return prevToken.ptr + prevToken.sourceLen <= cursorLocation && cursorLocation <= token.ptr + token.sourceLen 
    168168            && prevToken.value != TOK.TOKdot && prevToken.value != TOK.TOKslice && prevToken.value != TOK.TOKdotdotdot; 
    169169    } 
  • trunk/descent.tests/descent/tests/assist/CompletionOnImport_Test.java

    r856 r871  
    3737        createCompilationUnit("foo.bar", "other.d", ""); 
    3838        assertCompletions("foo", "test.d", "import f", 8, 
    39                 CompletionProposal.PACKAGE_REF, "foo.file", 7, 8, 
    40                 CompletionProposal.PACKAGE_REF, "foo.bar.other", 7, 8 
     39                CompletionProposal.PACKAGE_REF, "foo.bar.other", 7, 8, 
     40                CompletionProposal.PACKAGE_REF, "foo.file", 7, 8 
    4141                ); 
    4242    } 
     
    4646        createCompilationUnit("foo.bar", "other.d", ""); 
    4747        assertCompletions("foo", "test.d", "import fO", 9, 
    48                 CompletionProposal.PACKAGE_REF, "foo.file", 7, 9, 
    49                 CompletionProposal.PACKAGE_REF, "foo.bar.other", 7, 9 
     48                CompletionProposal.PACKAGE_REF, "foo.bar.other", 7, 9, 
     49                CompletionProposal.PACKAGE_REF, "foo.file", 7, 9 
    5050                ); 
    5151    }