daugian
11/15/2023, 12:01 PMJakub Gwóźdź
11/15/2023, 1:05 PMDavio
11/15/2023, 1:25 PMdaugian
11/15/2023, 1:30 PMJakub Gwóźdź
11/15/2023, 1:32 PMDavio
11/15/2023, 1:33 PMdaugian
11/15/2023, 1:35 PMDavio
11/15/2023, 1:36 PMdaugian
11/15/2023, 1:36 PMDavio
11/15/2023, 1:38 PMdaugian
11/15/2023, 1:39 PMDavio
11/15/2023, 1:40 PMmaiatoday
11/15/2023, 1:51 PMdaugian
11/15/2023, 2:02 PMKsenia Shneyveys
11/15/2023, 2:44 PMKroppeb
11/15/2023, 3:43 PMJakub Gwóźdź
11/15/2023, 3:46 PMuses crt;
from turbo pascal 😁Kroppeb
11/15/2023, 3:48 PMJakub Gwóźdź
11/15/2023, 3:49 PMdaugian
11/15/2023, 4:32 PMUtils.kt
file…
fun String.readLines(): List<String> {
croakIfUsingSampleInput()
return File("src", this).readLines()
}
private fun String.croakIfUsingSampleInput() {
if (contains("sample")) {
"❌❌❌ 🧝 YOU ARE USING SAMPLE INPUT ⚠️".println()
}
}
… since I lost some time on not finding the right answer because I used sample input, instead of the real input last year 😅ephemient
11/15/2023, 10:19 PMfun
in the main
source set, independent of any inputs, with a main()
function that runs it on real input (which is stored as a resource), and at least one @Test
function in the test
source set for each sample input./gradlew --continuous test run
I get pretty quick feedback as I editdaugian
11/16/2023, 6:52 AMJakub Gwóźdź
11/16/2023, 7:16 AMephemient
11/16/2023, 7:48 AMJakub Gwóźdź
11/16/2023, 8:04 AMephemient
11/16/2023, 8:09 AMJakub Gwóźdź
11/16/2023, 8:25 AM@Timeout(600)
or something 🙂Davio
11/20/2023, 9:10 AMNeil Banman
11/25/2023, 7:21 PMJakub Gwóźdź
11/27/2023, 7:26 AM* What went wrong:
and * Try:
sections from gradle output? Say in case of error, I’d only want to see
Day0Test > part1test() FAILED
org.opentest4j.AssertionFailedError: expected: <333> but was: <334>
3 tests completed, 1 failed, 1 skipped
FAILURE: Build failed with an exception.
to minimize the screen clogging. Do you maybe handle it somehow?ephemient
11/27/2023, 7:31 AM./gradlew -q
with customized test logging settingsJakub Gwóźdź
11/27/2023, 7:33 AM