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

isEmpty bug? #207

Closed
yossigil opened this issue Sep 14, 2016 · 3 comments
Closed

isEmpty bug? #207

yossigil opened this issue Sep 14, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@yossigil
Copy link
Member

Here is the error report I got:

java.lang.AssertionError: All I know is that threshould=0, and o=>
    at il.org.spartan.spartanizer.wring.InfixComparisonSizeToZero.replacement(InfixComparisonSizeToZero.java:67)
    at il.org.spartan.spartanizer.wring.InfixComparisonSizeToZero.replacement(InfixComparisonSizeToZero.java:63)
    at il.org.spartan.spartanizer.wring.InfixComparisonSizeToZero.replacement(InfixComparisonSizeToZero.java:101)
    at il.org.spartan.spartanizer.wring.InfixComparisonSizeToZero.replacement(InfixComparisonSizeToZero.java:123)
    at il.org.spartan.spartanizer.wring.InfixComparisonSizeToZero.replacement(InfixComparisonSizeToZero.java:1)
    at il.org.spartan.spartanizer.wring.strategies.ReplaceCurrentNode.claims(ReplaceCurrentNode.java:21)
    at il.org.spartan.spartanizer.wring.dispatch.Toolbox.find(Toolbox.java:183)
    at il.org.spartan.spartanizer.wring.dispatch.Toolbox.find(Toolbox.java:195)
    at il.org.spartan.spartanizer.wring.dispatch.Trimmer$2.go(Trimmer.java:62)

Note that I added an assertion that prints out the above message.

@yossigil yossigil added the bug label Sep 14, 2016
@yossigil yossigil added this to the Version 2.5 milestone Sep 14, 2016
@yossigil
Copy link
Member Author

Try these test cases, if you have a good editor you can convert them into test cases in a snap.

list.size() < 2 
j < trace.size()
int x = causeFrames.size() - 1
int x = wrapperFrames.size() - 1
(pos >= x.size()) 
len == x.size() - pos
(pos + ¢ > x.size()) 
int ¢ = x.size() - pos
return pos < x.size();
t = t.t(new String[split.size()])
t = t.t(new String[split.size()])
t = t.t(new Rule[rulesList.size()])
i < t.size()
(i < 0 || i >= collection.size()) 
i(sb.size() + text.length())
final int[] $ = new int[coll.size()];
f(getAllThreads().size() > 0)
f(getAllThreadGroups().size() > 0)
f(getAllThreadGroups().size() >= 7)
f(getAllThreads().size() >= 11)
x(f.size() == f)
x(foundDescriptions.size() == f)
A(typeVarAssigns.size() == 2) 
cs != null ? super.x(cs, offset, count) : super.x(x.buffer, 0, x.size())

@yossigil
Copy link
Member Author

Also, try this one (size() > 0) with no receiver.

@yossigil
Copy link
Member Author

I think the last commit resolved it.

yossigil added a commit that referenced this issue Sep 14, 2016
RoeiRaz pushed a commit that referenced this issue May 21, 2017
added tests for playground #207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants