Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular comparison order in FunctionCompletion #37

Open
tttwang23 opened this issue Nov 17, 2016 · 1 comment
Open

Circular comparison order in FunctionCompletion #37

tttwang23 opened this issue Nov 17, 2016 · 1 comment

Comments

@tttwang23
Copy link

Test case:

	@Test
	public void testCompletionOrdering1()
	{
		DefaultCompletionProvider provider = new DefaultCompletionProvider();
		final Completion c1 = new FunctionCompletion(provider, "add", "int");
		final Completion c2 = new VariableCompletion(provider, "indx", "int");
		final Completion c3 = new FunctionCompletion(provider, "Sub", "int");
		Assert.assertTrue(c1.compareTo(c2) < 0);
		Assert.assertTrue(c2.compareTo(c3) < 0);
		// (c1 < c2) and (c2 < c3), then it is implied that (c1 < c3)
		Assert.assertTrue(c1.compareTo(c3) < 0);
	}
@tttwang23
Copy link
Author

Fixed in the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant