Skip to content

Commit

Permalink
Fix GZIP test for java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenamar-db committed Dec 12, 2024
1 parent fd31bc8 commit d816764
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import mill._, scalalib._, publish._, scalajslib._, scalanativelib._, scalanativelib.api._
import $ivy.`com.lihaoyi::mill-contrib-jmh:`
import contrib.jmh.JmhModule
Expand Down
6 changes: 5 additions & 1 deletion sjsonnet/test/src-jvm/sjsonnet/StdGzipTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import utest._
object StdGzipTests extends TestSuite {
val tests = Tests {
test("gzip"){
eval("""std.gzip([1, 2])""") ==> ujson.Str("H4sIAAAAAAAAAGNkAgCSQsy2AgAAAA==")
eval("""std.gzip([1, 2])""") ==> ujson.Str(Runtime.version().feature() match {
// https://bugs.openjdk.org/browse/JDK-8244706
case _ >= 16 => "H4sIAAAAAAAA/2NkAgCSQsy2AgAAAA=="
case _ => "H4sIAAAAAAAAAGNkAgCSQsy2AgAAAA=="
})
eval("""std.gzip("hi")""") ==> ujson.Str("H4sIAAAAAAAAAMvIBACsKpPYAgAAAA==")
}
}
Expand Down

0 comments on commit d816764

Please sign in to comment.