diff options
author | tomlu <tomlu@google.com> | 2018-02-08 09:50:48 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-08 09:52:11 -0800 |
commit | 13018aab51d3e08f274eba0f36ca7b4aa70e5222 (patch) | |
tree | 3cfd66b30455d9a1dc88a8c12fd58014332eb320 /third_party/ijar/test/IjarTests.java | |
parent | 995d62e379493b04e8eb8966fa8e4da26bcb619d (diff) |
Update ijar tests to verify time stamp.
PiperOrigin-RevId: 185009133
Diffstat (limited to 'third_party/ijar/test/IjarTests.java')
-rw-r--r-- | third_party/ijar/test/IjarTests.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/third_party/ijar/test/IjarTests.java b/third_party/ijar/test/IjarTests.java index d07b37e3d2..467680552b 100644 --- a/third_party/ijar/test/IjarTests.java +++ b/third_party/ijar/test/IjarTests.java @@ -23,9 +23,11 @@ import com.google.common.io.ByteStreams; import com.google.devtools.build.java.bazel.BazelJavaCompiler; import java.io.File; import java.io.IOException; +import java.time.Instant; import java.util.Arrays; import java.util.Collections; import java.util.Enumeration; +import java.util.GregorianCalendar; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -285,6 +287,9 @@ public class IjarTests { Attributes attributes = manifest.getMainAttributes(); assertThat(attributes.getValue("Target-Label")).isEqualTo("//foo:foo"); assertThat(attributes.getValue("Injecting-Rule-Kind")).isEqualTo("foo_library"); + assertThat(jf.getEntry(JarFile.MANIFEST_NAME).getLastModifiedTime().toInstant()) + .isEqualTo( + Instant.ofEpochMilli(new GregorianCalendar(1980, 0, 1, 0, 0, 0).getTimeInMillis())); } } } |