You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a very weird and misleading message. Apparently, it happens because sprintf doesn't have three void attributes, but only two. The right code is this:
sprintf
"Hello, %s, your salary is %d"
*
"Jeff"
42
I suggest adding this test method to PhDefaultTest:
@TestvoidfailsCorrectlyWhenTooManyAttributesPut() {
MatcherAssert.assertThat(
"the message explains what's going on",
Assertions.assertThrows(
ExAbstract.class,
() -> newEOnumber().put(1, newData.ToPhi(1)),
"fails when trying to set attribute with too big position"
).getMessage(),
Matchers.equalTo("there are no void attributes left, can't set the 1st one")
);
}
Let's make it pass.
The text was updated successfully, but these errors were encountered:
Consider this code:
This will lead to error:
It's a very weird and misleading message. Apparently, it happens because
sprintf
doesn't have three void attributes, but only two. The right code is this:I suggest adding this test method to
PhDefaultTest
:Let's make it pass.
The text was updated successfully, but these errors were encountered: