Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-on from work on ScalaObjectSerializer supporting copying. #20

Open
sageserpent-open opened this issue Oct 11, 2024 · 2 comments
Open

Comments

@sageserpent-open
Copy link
Contributor

This follows on from #16 - I noticed a minor omission in one of the tests.

For the sake of expediency, I've enclosed a patch with this ticket. Hope that suffices, the changes are minor.

@sageserpent-open
Copy link
Contributor Author

Subject: [PATCH] Return the copied object from the helper AbstractKryoTest.testCopyingOf, and use a more revealing name for the corresponding result in AbstractKryoTest.testSerialization.of.

Index: core/src/test/scala/io/altoo/serialization/kryo/scala/testkit/AbstractKryoTest.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8

diff --git a/core/src/test/scala/io/altoo/serialization/kryo/scala/testkit/AbstractKryoTest.scala b/core/src/test/scala/io/altoo/serialization/kryo/scala/testkit/AbstractKryoTest.scala
--- a/core/src/test/scala/io/altoo/serialization/kryo/scala/testkit/AbstractKryoTest.scala (revision 09e1485)
+++ b/core/src/test/scala/io/altoo/serialization/kryo/scala/testkit/AbstractKryoTest.scala (date 1728636466202)
@@ -46,12 +46,12 @@
output.close()

 val input = new Input(new ByteArrayInputStream(serialized), 4096)
  • val obj1 = kryo.readClassAndObject(input)
  • val roundTripped = kryo.readClassAndObject(input)
    input.close()
  • assert(obj == obj1)
  • assert(obj == roundTripped)
  • obj1.asInstanceOf[T]
  • roundTripped.asInstanceOf[T]
    }

protected final def serialize[T](obj: T): Array[Byte] = {
@@ -76,6 +76,6 @@

 assert(copy == obj)
  • obj
  • copy
    }
    }

@sageserpent-open
Copy link
Contributor Author

Move conveniently:
issue-20.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant