From 4d065dcc8445ddba2fa91037570bdd9de24b7858 Mon Sep 17 00:00:00 2001 From: Jeremy Norris Date: Sat, 21 Jan 2023 12:00:19 -0600 Subject: [PATCH] Minor syntax cleanup to scala sources. --- src/test/scala/Adler32Test.scala | 14 +++++++------- src/test/scala/CRC32Test.scala | 14 +++++++------- src/test/scala/DeflateInflateTest.scala | 20 ++++++++++---------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/test/scala/Adler32Test.scala b/src/test/scala/Adler32Test.scala index c25a86a2..40f19024 100644 --- a/src/test/scala/Adler32Test.scala +++ b/src/test/scala/Adler32Test.scala @@ -26,7 +26,7 @@ class Adler32Test extends AnyFlatSpec with BeforeAndAfter with Matchers { juza.update(buf1, 0, buf1.length) juza.getValue } - val actual = getValue(List(buf1)); + val actual = getValue(List(buf1)) actual should equal (expected) } @@ -37,12 +37,12 @@ class Adler32Test extends AnyFlatSpec with BeforeAndAfter with Matchers { val adler1 = new Adler32 - adler1.update(buf1, 0, buf1.length); + adler1.update(buf1, 0, buf1.length) val adler2 = adler1.copy - adler1.update(buf2, 0, buf1.length); - adler2.update(buf2, 0, buf1.length); + adler1.update(buf2, 0, buf1.length) + adler2.update(buf2, 0, buf1.length) val expected = adler1.getValue val actual = adler2.getValue @@ -55,9 +55,9 @@ class Adler32Test extends AnyFlatSpec with BeforeAndAfter with Matchers { val buf1 = randombuf(1024) val buf2 = randombuf(1024) - val adler1 = getValue(List(buf1)); - val adler2 = getValue(List(buf2)); - val expected = getValue(List(buf1, buf2)); + val adler1 = getValue(List(buf1)) + val adler2 = getValue(List(buf2)) + val expected = getValue(List(buf1, buf2)) val actual = Adler32.combine(adler1, adler2, buf2.length) diff --git a/src/test/scala/CRC32Test.scala b/src/test/scala/CRC32Test.scala index a6aabdce..c2213be4 100644 --- a/src/test/scala/CRC32Test.scala +++ b/src/test/scala/CRC32Test.scala @@ -26,7 +26,7 @@ class CRC32Test extends AnyFlatSpec with BeforeAndAfter with Matchers { juza.update(buf1, 0, buf1.length) juza.getValue } - val actual = getValue(List(buf1)); + val actual = getValue(List(buf1)) actual should equal (expected) } @@ -37,12 +37,12 @@ class CRC32Test extends AnyFlatSpec with BeforeAndAfter with Matchers { val crc1 = new CRC32 - crc1.update(buf1, 0, buf1.length); + crc1.update(buf1, 0, buf1.length) val crc2 = crc1.copy - crc1.update(buf2, 0, buf1.length); - crc2.update(buf2, 0, buf1.length); + crc1.update(buf2, 0, buf1.length) + crc2.update(buf2, 0, buf1.length) val expected = crc1.getValue val actual = crc2.getValue @@ -55,9 +55,9 @@ class CRC32Test extends AnyFlatSpec with BeforeAndAfter with Matchers { val buf1 = randombuf(1024) val buf2 = randombuf(1024) - val crc1 = getValue(List(buf1)); - val crc2 = getValue(List(buf2)); - val expected = getValue(List(buf1, buf2)); + val crc1 = getValue(List(buf1)) + val crc2 = getValue(List(buf2)) + val expected = getValue(List(buf1, buf2)) val actual = CRC32.combine(crc1, crc2, buf2.length) diff --git a/src/test/scala/DeflateInflateTest.scala b/src/test/scala/DeflateInflateTest.scala index eaadb26d..5370d9e4 100644 --- a/src/test/scala/DeflateInflateTest.scala +++ b/src/test/scala/DeflateInflateTest.scala @@ -60,7 +60,7 @@ class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers { err = deflater.deflate(Z_NO_FLUSH) err should equal (Z_OK) - err = deflater.deflate(JZlib.Z_FINISH); + err = deflater.deflate(JZlib.Z_FINISH) err should equal (Z_STREAM_END) err = deflater.end @@ -108,7 +108,7 @@ class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers { deflater.avail_out = 1 err = deflater.deflate(Z_FINISH) } - while(err != Z_STREAM_END); + while(err != Z_STREAM_END) err = deflater.end err should equal (Z_OK) @@ -123,8 +123,8 @@ class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers { while(inflater.total_out dictID should equal (inflater.getAdler) - err = inflater.setDictionary(dictionary, dictionary.length); + err = inflater.setDictionary(dictionary, dictionary.length) err should equal (Z_OK) case _ => err should equal (Z_OK) @@ -200,14 +200,14 @@ class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers { err should equal (Z_OK) deflater.setInput(hello) - deflater.avail_in = 3; + deflater.avail_in = 3 deflater.setOutput(compr) err = deflater.deflate(Z_FULL_FLUSH) err should equal (Z_OK) compr(3) = (compr(3) + 1).asInstanceOf[Byte] - deflater.avail_in = hello.length - 3; + deflater.avail_in = hello.length - 3 err = deflater.deflate(Z_FINISH) err should equal (Z_STREAM_END) @@ -303,7 +303,7 @@ class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers { deflater.avail_out = 1 err = deflater.deflate(Z_FINISH) } - while(err != Z_STREAM_END); + while(err != Z_STREAM_END) err = deflater.end err should equal (Z_OK) @@ -318,8 +318,8 @@ class DeflateInflateTest extends AnyFlatSpec with BeforeAndAfter with Matchers { while(inflater.total_out