feat(#3251): codacy + typos

This commit is contained in:
maxonfjvipon 2024-07-28 17:43:06 +03:00
parent 9e16807371
commit 869250f335
No known key found for this signature in database
GPG Key ID: D8563899D473D273
2 changed files with 19 additions and 18 deletions

View File

@ -25,9 +25,6 @@
# package name contains capital letter and such names are conventional.
---
exclude_paths:
- "eo-runtime/src/main/java/EOorg/EOeolang/EOnumber$EOtimes.java"
- "eo-runtime/src/main/java/EOorg/EOeolang/EOnumber$EOdiv.java"
- "eo-runtime/src/main/java/EOorg/EOeolang/EOnumber$EOplus.java"
- "eo-runtime/src/main/java/EOorg/EOeolang/EOnumber$EOgt.java"
- "eo-runtime/src/main/java/EOorg/EOeolang/EOnumber$EOfloor.java"
- "eo-runtime/src/test/java/EOorg/EOeolang/EOnumberTest.java"
- "eo-runtime/src/main/java/EOorg/EOeolang/EOio/EOconsole$EOread$EOread_bytes.java"
- "eo-runtime/src/main/java/EOorg/EOeolang/EOio/EOconsole$EOwrite$EOwritten_bytes.java"
- "eo-runtime/src/test/java/EOorg/EOeolang/EOio/EOconsoleTest.java"

View File

@ -107,7 +107,6 @@ final class EOconsoleTest {
@Test
@StdIo("Hello, world!")
void readsBytesFromStandardInput(final StdIn input) {
final String data = "Hello, world!";
MatcherAssert.assertThat(
"The object `console.read.read-bytes` should have read all bytes from standard input, but it didn't",
new Dataized(
@ -153,19 +152,25 @@ final class EOconsoleTest {
@Test
@StdIo("Hello world")
void readsByPortionsFromInput() {
final Phi read = new PhWith(
new EOconsole$EOread$EOread_bytes(),
0, new Data.ToPhi(5)
);
MatcherAssert.assertThat(
"The object `console.read.read-bytes` should have read first 5 bytes from standard input, but it didn't",
new Dataized(read).asString(),
new Dataized(
new PhWith(
new EOconsole$EOread$EOread_bytes(),
0, new Data.ToPhi(5)
)
).asString(),
Matchers.equalTo("Hello")
);
MatcherAssert.assertThat(
"The object `console.read.read-bytes` should have read second 5 bytes from standard input, but it didn't",
new Dataized(read).asString(),
Matchers.equalTo(" worl")
new Dataized(
new PhWith(
new EOconsole$EOread$EOread_bytes(),
0, new Data.ToPhi(6)
)
).asString(),
Matchers.equalTo(" world")
);
}
@ -173,23 +178,22 @@ final class EOconsoleTest {
@StdIo("Hello world")
void readsSequentiallyFromInputBlock() {
final Phi console = Phi.Φ.take("org.eolang.io.console");
final Phi size = new Data.ToPhi(5);
final Phi first = new PhWith(
new PhCopy(
new PhMethod(console, "read")
),
0, size
0, new Data.ToPhi(5)
);
final Phi second = new PhWith(
new PhCopy(
new PhMethod(first, "read")
),
0, size
0, new Data.ToPhi(6)
);
MatcherAssert.assertThat(
"The `console.read` object should have return input block ready to `read` again, but it didn't",
new Dataized(second).asString(),
Matchers.equalTo(" worl")
Matchers.equalTo(" world")
);
}
}