xian / great-expectations Goto Github PK
View Code? Open in Web Editor NEWJasmine-style expectations for Java
License: MIT License
Jasmine-style expectations for Java
License: MIT License
just upgraded to 0.13 and getting compilation errors:
TestHelper.java:69: cannot find symbol
symbol : method valueOf(long)
location: bound of type variable T
test is of form:
long foo = 10;
long bar = 20;
expect(foo).toEqual(bar);
noticed a workaround for boolean primitives, might be the same issue (autoboxing?). works ok if i disable LongMatcher.
Hi.
I find Eclipse doesn't like the suggested Expect.java code with the 0.12 library.
This is Java 1.6, Eclipse 3.6's response to the suggested Long:
public static <T extends Long, M extends LongMatcher<T, M>> LongMatcher<T, ?> expect(T actual) {
return wrapped(LongMatcher.class, actual);
}
Test.java:
@test
public void trivial()
{
long ten = 10;
expect(ten).toBe(10L);
//Eclipse shows an error: Bound mismatch: The generic method expect(T) of type Expect is not applicable for the arguments (Long). The inferred type ObjectMatcher<Long,ObjectMatcher<Long,M>> is not a valid substitute for the bounded parameter <M extends ObjectMatcher<T,M>>
}
Eclipse is only happy if have expect()s like this:
public static ComparableMatcher<T, ?> expect (T actual) {
return wrapped(ComparableMatcher.class, actual);
}
Boolean works happily from great-expectations 0.12 - already having this sort of expect() - but String fails in a similar way.
Am I using the wrong version of Java? Is this something else Eclipse is deficient in? I didn't see a set of minimum versions specified in the readme file.
I'm using Ubuntu Oneric, in case it's relevant.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.