Comments (3)
Personally, I'd say the values provided by the ClassLoader are properly called "expected" - you're testing that your code generates the same result as what the ClassLoader returns, it doesn't really matter how it gets that result.
Now, it might make sense to (a) log more details about the ClassLoader's state (b) create separate tests that assert on the ClassLoader's behavior or (c) add additional sanity-check assertions before "expect"-ing the ClassLoader's output, but those options are all distinct from what we call it once we do decide to treat the ClassLoader's output as "expected".
from truth.
I think you're right: It's just uncertainty about whether ClassLoader
is doing what I expect. Maybe another way to look at it is this: If the test fails, I might change ClassPath
, or I might change ClassPathTest
. But I'm not likely to change ClassLoader
:)
from truth.
(I just came across a test that compared a.equals(b)
and a.compareTo(b) == 0
. Arguably neither of these is the clear "expected" or "actual"; we're just looking for compatibility between the two. Not that I think that's enough reason to resurrect this proposal.)
from truth.
Related Issues (20)
- Consider reducing ImmutableList array copying HOT 1
- Wanted: Truth8Junit to support Java 8 types with assume() HOT 3
- Compatibility with gradle 7.6 HOT 2
- UsingCorrespondence should fail on use of equals(), like Subject does
- 1.1.4, Guava update leads to java.lang.UnsupportedOperationException at WindowsSecurityDescriptor.java:358 HOT 2
- Add StringSubject isNotBlank or hasText HOT 2
- Idk
- com.google.guava:guava library version update HOT 2
- Matching on exact class type, not a subtype HOT 2
- Write a comparison to Kluent, AssertK, Strikt, Atrium, Kotest, other Kotlin assertion libraries? HOT 13
- Protobuf: allow unpopulated required fields when `comparingExpectedFieldsOnly` HOT 5
- Truth 1.1+ depends on Java 8 bytecode HOT 3
- FAQ entry: Why we don't support multiple chained calls to assertion methods on the same Subject HOT 3
- Port a core set of unit tests to kotlin HOT 2
- JUnit5 support for the existing soft-assertions support (Expect.create JUnit4 Rule) HOT 5
- Document when arrays are compared by their contents vs. their object identity HOT 3
- New extension for Gradle's TestKit HOT 1
- Asymmetric matchers like Jest's expect.stringContaining("") ? HOT 3
- Add MapSubject#containsAnyOf HOT 2
- Allow logical operations on assertions HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from truth.