# Test
# ------------------------------
OUnitTest(cmdOpt, cmdOpt $(ROOT)/config)
-OUnitTest(link, link reloc)
-OUnitTest(reloc, reloc)
-OUnitTest(uniq, uniq)
+OUnitTest(link, link reloc emptyAbc)
+OUnitTest(reloc, reloc emptyAbc)
+OUnitTest(compact, compact emptyAbc)
# ------------------------------
# PHONY target
--- /dev/null
+open Base
+
+let compact _ = undef
--- /dev/null
+val compact : Swflib.Abc.abc -> Swflib.Abc.abc
open OUnit
open Swflib.AbcType
-open Uniq
-
-let cpool = {
- Swflib.AbcType.int = [];
- uint = [];
- double = [];
- string = [];
- namespace = [];
- namespace_set = [];
- multiname = [];
-}
-
-let abc = {
- Swflib.AbcType.cpool = cpool;
- method_info = [];
- metadata = [];
- classes = [];
- instances = [];
- scripts = [];
- method_bodies = []
-}
-
-let info = {
- params = [];
- return = 0;
- method_name = 0;
- method_flags = []
-}
-
-let body = {
- method_sig = 0;
- max_stack = 0;
- local_count = 0;
- init_scope_depth = 0;
- max_scope_depth = 0;
- code = [];
- exceptions = [];
- method_traits = []
-}
+open EmptyAbc
+open Compact
let ok x y =
- assert_equal x (uniq y)
+ assert_equal x (compact y)
let _ = begin "uniq.ml" >::: [
"id" >:: begin fun () ->
--- /dev/null
+open Swflib.AbcType
+
+let cpool = {
+ Swflib.AbcType.int = [];
+ uint = [];
+ double = [];
+ string = [];
+ namespace = [];
+ namespace_set = [];
+ multiname = [];
+}
+
+let abc = {
+ Swflib.AbcType.cpool = cpool;
+ method_info = [];
+ metadata = [];
+ classes = [];
+ instances = [];
+ scripts = [];
+ method_bodies = []
+}
+
+let info = {
+ params = [];
+ return = 0;
+ method_name = 0;
+ method_flags = []
+}
+
+let body = {
+ method_sig = 0;
+ max_stack = 0;
+ local_count = 0;
+ init_scope_depth = 0;
+ max_scope_depth = 0;
+ code = [];
+ exceptions = [];
+ method_traits = []
+}
+
+let class_ = {
+ cinit=0;
+ class_traits=[];
+}
+
+let instance={
+ instance_name=0;
+ super_name=0;
+ instance_flags=[];
+ interfaces=[];
+ iinit=0;
+ instance_traits=[]
+}
+
open Link
open Swflib.AbcType
+open EmptyAbc
+
let ok ?msg x y z =
assert_equal ?msg ~printer:Std.dump x (link y z)
let lok ?msg x y =
ok ?msg x y y
-let cpool = {
- int = [];
- uint = [];
- double = [];
- string = [];
- namespace = [];
- namespace_set = [];
- multiname = []
-}
-
-let abc = {
- cpool = cpool;
- method_info = [];
- metadata = [];
- classes = [];
- instances = [];
- scripts = [];
- method_bodies = []
-}
-
-let info = {
- params = [];
- return = 0;
- method_name = 0;
- method_flags = []
-}
-
-let body = {
- method_sig = 0;
- max_stack = 0;
- local_count = 0;
- init_scope_depth = 0;
- max_scope_depth = 0;
- code = [];
- exceptions = [];
- method_traits = []
-}
-
-let class_ = {
- cinit=0;
- class_traits=[];
-}
-
-let instance={
- instance_name=0;
- super_name=0;
- instance_flags=[];
- interfaces=[];
- iinit=0;
- instance_traits=[]
-}
-
let _ = begin "link.ml" >::: [
"ident" >:: begin fun () ->
ok abc abc abc
open Base
open OUnit
open Swflib.AbcType
+open EmptyAbc
open Reloc
let plus n x = n + x
}
let ok x y = assert_equal x @@ reloc ctx y
-let cpool = {
- Swflib.AbcType.int = [];
- uint = [];
- double = [];
- string = [];
- namespace = [];
- namespace_set = [];
- multiname = [];
-}
-
-let abc = {
- Swflib.AbcType.cpool = cpool;
- method_info = [];
- metadata = [];
- classes = [];
- instances = [];
- scripts = [];
- method_bodies = []
-}
-
-let info = {
- params = [];
- return = 0;
- method_name = 0;
- method_flags = []
-}
-
-let body = {
- method_sig = 0;
- max_stack = 0;
- local_count = 0;
- init_scope_depth = 0;
- max_scope_depth = 0;
- code = [];
- exceptions = [];
- method_traits = []
-}
-
-let class_ = {
- cinit=0;
- class_traits=[];
-}
-
-let instance={
- instance_name=0;
- super_name=0;
- instance_flags=[];
- interfaces=[];
- iinit=0;
- instance_traits=[]
-}
-
-
let _ = begin "reloc.ml" >::: [
"cpool" >:: begin fun () ->
ok
+++ /dev/null
-open Base
-
-let uniq _ = undef