Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

t/common: Add decompile function

  • Loading branch information...
commit acc68f95a062d259c7890347f5f69e059b37f05d 1 parent 048e1d2
Brian Gernhardt authored July 24, 2012
5  t/00-sanity.t
@@ -34,7 +34,7 @@ class SanityTest {
34 34
         assert.not_null(class PACT.Packfile.Decompile, 'found Decompile');
35 35
     }
36 36
 
37  
-    function test_compile() {
  37
+    function test_compile_decompile() {
38 38
         var assert = self.assert;
39 39
 
40 40
         var pack = compile(<<:
@@ -46,6 +46,9 @@ class SanityTest {
46 46
 
47 47
         assert.not_null(pack);
48 48
         assert.instance_of(pack, 'Packfile');
  49
+
  50
+        var pact = decompile(pack);
  51
+        assert.instance_of(pact, class PACT.Packfile);
49 52
     }
50 53
 }
51 54
 
5  t/common.winxed
@@ -15,3 +15,8 @@ function compile(string pir) {
15 15
     var pack = new 'Packfile'(view);
16 16
     return pack;
17 17
 }
  18
+
  19
+function decompile(var packfile) {
  20
+    :PACT.Packfile.Decompile decomp(packfile);
  21
+    return decomp.pact;
  22
+}

0 notes on commit acc68f9

Please sign in to comment.
Something went wrong with that request. Please try again.