Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

t/common: Add decompile function

  • Loading branch information...
commit acc68f95a062d259c7890347f5f69e059b37f05d 1 parent 048e1d2
@Benabik Benabik authored
Showing with 9 additions and 1 deletion.
  1. +4 −1 t/00-sanity.t
  2. +5 −0 t/common.winxed
View
5 t/00-sanity.t
@@ -34,7 +34,7 @@ class SanityTest {
assert.not_null(class PACT.Packfile.Decompile, 'found Decompile');
}
- function test_compile() {
+ function test_compile_decompile() {
var assert = self.assert;
var pack = compile(<<:
@@ -46,6 +46,9 @@ class SanityTest {
assert.not_null(pack);
assert.instance_of(pack, 'Packfile');
+
+ var pact = decompile(pack);
+ assert.instance_of(pact, class PACT.Packfile);
}
}
View
5 t/common.winxed
@@ -15,3 +15,8 @@ function compile(string pir) {
var pack = new 'Packfile'(view);
return pack;
}
+
+function decompile(var packfile) {
+ :PACT.Packfile.Decompile decomp(packfile);
+ return decomp.pact;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.