cauterize 0.0.1.pre1 → 0.0.1.pre5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.rspec +1 -1
- data/Gemfile +1 -1
- data/README.md +0 -2
- data/Rakefile +19 -3
- data/bin/cauterize +14 -6
- data/example/Cauterize +22 -10
- data/example/build.sh +15 -2
- data/lib/cauterize/base_type.rb +2 -5
- data/lib/cauterize/builders.rb +1 -3
- data/lib/cauterize/builders/c/buildable.rb +3 -2
- data/lib/cauterize/builders/c/builtin.rb +46 -0
- data/lib/cauterize/builders/c/enumeration.rb +23 -2
- data/lib/cauterize/builders/c/fixed_array.rb +16 -7
- data/lib/cauterize/builders/c/group.rb +32 -3
- data/lib/cauterize/builders/c/scalar.rb +5 -0
- data/lib/cauterize/builders/c/variable_array.rb +1 -1
- data/lib/cauterize/builders/cs/buildable.rb +59 -0
- data/lib/cauterize/builders/cs/builtin.rb +23 -0
- data/lib/cauterize/builders/cs/composite.rb +21 -0
- data/lib/cauterize/builders/cs/csarray.rb +32 -0
- data/lib/cauterize/builders/cs/enumeration.rb +21 -0
- data/lib/cauterize/builders/cs/fixed_array.rb +25 -0
- data/lib/cauterize/builders/cs/group.rb +33 -0
- data/lib/cauterize/builders/cs/scalar.rb +10 -0
- data/lib/cauterize/builders/cs/variable_array.rb +34 -0
- data/lib/cauterize/builtin.rb +52 -0
- data/lib/cauterize/c_builder.rb +15 -1
- data/lib/cauterize/cauterize.rb +44 -13
- data/lib/cauterize/composite.rb +3 -3
- data/lib/cauterize/cs_builder.rb +53 -0
- data/lib/cauterize/enumeration.rb +20 -3
- data/lib/cauterize/fixed_array.rb +3 -3
- data/lib/cauterize/formatter.rb +7 -3
- data/lib/cauterize/group.rb +5 -8
- data/lib/cauterize/scalar.rb +16 -7
- data/lib/cauterize/variable_array.rb +6 -6
- data/lib/cauterize/version.rb +1 -1
- data/spec/base_type_spec.rb +133 -125
- data/spec/builders/c/buildable_spec.rb +18 -18
- data/spec/builders/c/builtin_spec.rb +22 -0
- data/spec/builders/c/composite_spec.rb +37 -33
- data/spec/builders/c/enumeration_spec.rb +84 -21
- data/spec/builders/c/fixed_array_spec.rb +6 -6
- data/spec/builders/c/group_spec.rb +97 -90
- data/spec/builders/c/scalar_spec.rb +24 -6
- data/spec/builders/c/variable_array_spec.rb +37 -37
- data/spec/builders/cs/buildable_spec.rb +8 -0
- data/spec/builders/cs/composite_spec.rb +32 -0
- data/spec/builders/cs/enumeration_spec.rb +33 -0
- data/spec/builders/cs/fixed_array_spec.rb +40 -0
- data/spec/builders/cs/group_spec.rb +56 -0
- data/spec/builders/cs/scalar_spec.rb +7 -0
- data/spec/builders/cs/variable_array_spec.rb +46 -0
- data/spec/builders_spec.rb +38 -38
- data/spec/builtin_spec.rb +46 -0
- data/spec/c_builder_spec.rb +116 -102
- data/spec/cauterize_spec.rb +8 -1
- data/spec/composite_spec.rb +52 -48
- data/spec/cs_builder_spec.rb +113 -0
- data/spec/enumeration_spec.rb +55 -16
- data/spec/fixed_array_spec.rb +7 -9
- data/spec/group_spec.rb +81 -76
- data/spec/scalar_spec.rb +20 -10
- data/spec/spec_helper.rb +103 -94
- data/spec/support/shared_examples_for_c_buildables.rb +68 -64
- data/spec/variable_array_spec.rb +12 -17
- data/{c → support/c}/src/cauterize.c +8 -7
- data/support/c/src/cauterize.h +59 -0
- data/{c → support/c}/src/cauterize_debug.h +0 -0
- data/support/c/src/cauterize_util.h +49 -0
- data/{c → support/c}/test/greatest.h +0 -0
- data/{c → support/c}/test/test.c +0 -0
- data/support/cs/src/CauterizeCompositeFormatter.cs +34 -0
- data/support/cs/src/CauterizeContainerFormatter.cs +18 -0
- data/support/cs/src/CauterizeEnumFormatter.cs +67 -0
- data/support/cs/src/CauterizeException.cs +15 -0
- data/support/cs/src/CauterizeFixedArrayFormatter.cs +39 -0
- data/support/cs/src/CauterizeFormatter.cs +40 -0
- data/support/cs/src/CauterizeGroupFormatter.cs +46 -0
- data/support/cs/src/CauterizePrimitiveFormatter.cs +33 -0
- data/support/cs/src/CauterizeTypeFormatterFactory.cs +39 -0
- data/support/cs/src/CauterizeTypes.cs +107 -0
- data/support/cs/src/CauterizeVariableArrayFormatter.cs +49 -0
- data/support/cs/src/ICauterizeTypeFormatter.cs +12 -0
- data/support/cs/src/OrderAttribute.cs +50 -0
- data/support/cs/src/PrimitiveSupport.cs +134 -0
- data/support/cs/src/SerializedRepresentationAttribute.cs +24 -0
- data/support/cs/test/CauterizeCompositeFormatterTest.cs +59 -0
- data/support/cs/test/CauterizeEnumFormatterTest.cs +110 -0
- data/support/cs/test/CauterizeFixedArrayFormatterTest.cs +91 -0
- data/support/cs/test/CauterizeFormatterTest.cs +40 -0
- data/support/cs/test/CauterizeGroupFormatterTest.cs +147 -0
- data/support/cs/test/CauterizeIntegrationTest.cs +129 -0
- data/support/cs/test/CauterizePrimitiveFormatterTest.cs +98 -0
- data/support/cs/test/CauterizeTypeFormatterFactoryTest.cs +73 -0
- data/support/cs/test/CauterizeVariableArrayFormatterTest.cs +130 -0
- data/support/cs/test/OrderAttributeTest.cs +39 -0
- data/support/cs/test/SerializedRepresentationAttributeTest.cs +39 -0
- metadata +68 -10
- data/c/src/cauterize.h +0 -46
- data/c/src/cauterize_util.h +0 -7
data/spec/c_builder_spec.rb
CHANGED
@@ -1,132 +1,146 @@
|
|
1
1
|
require 'tmpdir'
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
module Cauterize
|
5
|
+
describe Cauterize::CBuilder do
|
6
|
+
before do
|
7
|
+
@tempdir = Dir.mktmpdir
|
8
|
+
@h_path = File.join(@tempdir, "testing.h")
|
9
|
+
@c_path = File.join(@tempdir, "testing.c")
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
@cb = CBuilder.new(@h_path, @c_path, "testing")
|
12
|
+
end
|
13
|
+
after { FileUtils.rm_rf @tempdir }
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
describe :initialize do
|
16
|
+
it "saves the h and c paths" do
|
17
|
+
@cb.h.should == @h_path
|
18
|
+
@cb.c.should == @c_path
|
19
|
+
end
|
18
20
|
end
|
19
|
-
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
scalar(:uint16_t)
|
25
|
-
scalar(:uint32_t)
|
22
|
+
describe :build do
|
23
|
+
before do
|
24
|
+
Cauterize.set_version("1.2.3")
|
26
25
|
|
27
|
-
|
28
|
-
fa.array_type :uint8_t
|
29
|
-
fa.array_size 6
|
30
|
-
end
|
26
|
+
Cauterize.scalar(:small_uint) {|t| t.type_name(:uint8)}
|
31
27
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
28
|
+
Cauterize.fixed_array(:mac_address) do |fa|
|
29
|
+
fa.array_type :small_uint
|
30
|
+
fa.array_size 6
|
31
|
+
end
|
37
32
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
33
|
+
Cauterize.variable_array(:mac_table) do |t|
|
34
|
+
t.array_type :mac_address
|
35
|
+
t.array_size 64
|
36
|
+
t.size_type :small_uint
|
37
|
+
end
|
43
38
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
Cauterize.variable_array(:name) do |va|
|
40
|
+
va.array_type :small_uint
|
41
|
+
va.size_type :small_uint
|
42
|
+
va.array_size 32
|
43
|
+
end
|
48
44
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
45
|
+
Cauterize.enumeration(:gender) do |e|
|
46
|
+
e.value :male
|
47
|
+
e.value :female
|
48
|
+
end
|
53
49
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
end
|
50
|
+
Cauterize.composite(:place) do |c|
|
51
|
+
c.field :name, :name
|
52
|
+
c.field :elevation, :uint32
|
53
|
+
end
|
59
54
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
55
|
+
Cauterize.composite(:person) do |c|
|
56
|
+
c.field :first_name, :name
|
57
|
+
c.field :last_name, :name
|
58
|
+
c.field :gender, :gender
|
59
|
+
end
|
65
60
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
61
|
+
Cauterize.composite(:dog) do |c|
|
62
|
+
c.field :name, :name
|
63
|
+
c.field :gender, :gender
|
64
|
+
c.field :leg_count, :small_uint
|
65
|
+
end
|
70
66
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
@c_lines = @c_text.lines.to_a
|
76
|
-
end
|
67
|
+
Cauterize.group(:creature) do |g|
|
68
|
+
g.field :person, :person
|
69
|
+
g.field :dog, :dog
|
70
|
+
end
|
77
71
|
|
78
|
-
|
79
|
-
|
80
|
-
@h_lines
|
81
|
-
@
|
82
|
-
@
|
72
|
+
@cb.build
|
73
|
+
@h_text = File.read(@cb.h)
|
74
|
+
@h_lines = @h_text.lines.to_a
|
75
|
+
@c_text = File.read(@cb.c)
|
76
|
+
@c_lines = @c_text.lines.to_a
|
83
77
|
end
|
84
78
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
end
|
79
|
+
describe "header generation" do
|
80
|
+
it "externs 'c'" do
|
81
|
+
@h_lines.should include("extern \"C\" {\n")
|
82
|
+
end
|
90
83
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
84
|
+
it "creates a VERSION define" do
|
85
|
+
@h_lines.should include("#define GEN_VERSION (\"1.2.3\")\n")
|
86
|
+
end
|
87
|
+
|
88
|
+
it "creates a DATE define" do
|
89
|
+
@h_lines.any?{|l| l.match /GEN_DATE/}.should be_true
|
90
|
+
end
|
91
|
+
|
92
|
+
it "prevents multiple inclusion in headers" do
|
93
|
+
@h_lines[0].should match /#ifndef TESTING_H_\d+/
|
94
|
+
@h_lines[1].should match /#define TESTING_H_\d+/
|
95
|
+
@h_lines.last.should match /#endif \/\* TESTING_H_\d+ \*\//
|
96
|
+
end
|
97
|
+
|
98
|
+
it "includes prototype information for all defined types" do
|
99
|
+
@h_text.should match "struct name;"
|
100
|
+
@h_text.should match "struct person;"
|
101
|
+
@h_text.should match "struct place;"
|
102
|
+
end
|
103
|
+
|
104
|
+
it "includes enumeration and structure definitions" do
|
105
|
+
@h_text.should match /gender/
|
106
|
+
@h_text.should match /MALE = 0/
|
107
|
+
@h_text.should match /FEMALE = 1/
|
108
|
+
end
|
95
109
|
end
|
96
|
-
end
|
97
110
|
|
98
|
-
|
99
|
-
|
100
|
-
|
111
|
+
describe "c body generation" do
|
112
|
+
it "includes the generated header file" do
|
113
|
+
@c_text.should match /#include "testing.h"/
|
114
|
+
end
|
101
115
|
end
|
102
|
-
end
|
103
116
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
117
|
+
describe "compilation" do
|
118
|
+
it "can be built" do
|
119
|
+
caut_dir = "#{File.dirname(__FILE__)}/../support/c/src"
|
120
|
+
|
121
|
+
res = Dir.chdir @tempdir do
|
122
|
+
File.open("test_main.c", "wb") do |fh|
|
123
|
+
syms = BaseType.all_instances.map do |i|
|
124
|
+
b = Builders.get(:c, i)
|
125
|
+
[b.packer_sym, b.unpacker_sym]
|
126
|
+
end.flatten
|
127
|
+
fh.write(gen_test_main(syms))
|
128
|
+
end
|
129
|
+
|
130
|
+
cmd = %W{
|
131
|
+
gcc -Wall -Wextra -Werror
|
132
|
+
-I#{caut_dir}
|
133
|
+
#{@cb.c}
|
134
|
+
#{caut_dir}/cauterize.c
|
135
|
+
test_main.c
|
136
|
+
-o testing.bin 2>&1
|
137
|
+
}.join(" ")
|
138
|
+
|
139
|
+
`#{cmd}`
|
115
140
|
end
|
116
141
|
|
117
|
-
|
118
|
-
clang -Wall -Wextra -Werror
|
119
|
-
-I#{caut_dir}
|
120
|
-
#{@cb.c}
|
121
|
-
#{caut_dir}/cauterize.c
|
122
|
-
test_main.c
|
123
|
-
-o testing.bin 2>&1
|
124
|
-
}.join(" ")
|
125
|
-
|
126
|
-
`#{cmd}`
|
142
|
+
res.should == ""
|
127
143
|
end
|
128
|
-
|
129
|
-
res.should == ""
|
130
144
|
end
|
131
145
|
end
|
132
146
|
end
|
data/spec/cauterize_spec.rb
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
describe Cauterize do
|
2
2
|
describe :set_name do
|
3
3
|
it "sets the name of the project" do
|
4
|
-
set_name("some_name")
|
4
|
+
Cauterize.set_name("some_name")
|
5
5
|
Cauterize.get_name.should == "some_name"
|
6
6
|
end
|
7
7
|
end
|
8
|
+
|
9
|
+
describe :set_version do
|
10
|
+
it "sets a version string" do
|
11
|
+
Cauterize.set_version("0.1.2")
|
12
|
+
Cauterize.get_version.should == "0.1.2"
|
13
|
+
end
|
14
|
+
end
|
8
15
|
end
|
data/spec/composite_spec.rb
CHANGED
@@ -1,62 +1,66 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe Composite do
|
17
|
-
describe :initialize do
|
18
|
-
it "creates a Composite" do
|
19
|
-
c = Composite.new(:foo)
|
20
|
-
c.name.should == :foo
|
1
|
+
module Cauterize
|
2
|
+
describe Cauterize do
|
3
|
+
describe CompositeField do
|
4
|
+
describe :initialize do
|
5
|
+
it "creates a new name -> type mapping" do
|
6
|
+
a = Cauterize.scalar(:a_type)
|
7
|
+
b = Cauterize.scalar(:b_type)
|
8
|
+
f = CompositeField.new(:a_name, :a_type)
|
9
|
+
f.name.should == :a_name
|
10
|
+
f.type.should be a
|
11
|
+
end
|
21
12
|
end
|
22
13
|
end
|
23
14
|
|
24
|
-
describe
|
25
|
-
|
26
|
-
a
|
27
|
-
|
28
|
-
c.
|
15
|
+
describe Composite do
|
16
|
+
describe :initialize do
|
17
|
+
it "creates a Composite" do
|
18
|
+
c = Composite.new(:foo)
|
19
|
+
c.name.should == :foo
|
29
20
|
end
|
30
|
-
|
31
|
-
comp.fields.keys[0].should == :a_foo
|
32
|
-
comp.fields.values[0].name.should == :a_foo
|
33
|
-
comp.fields.values[0].type.should be a
|
34
21
|
end
|
35
22
|
|
36
|
-
|
37
|
-
a
|
38
|
-
|
39
|
-
composite(:comp) do |c|
|
23
|
+
describe :fields do
|
24
|
+
it "defines a new field in the composite" do
|
25
|
+
a = Cauterize.scalar(:foo)
|
26
|
+
comp = Cauterize.composite(:comp) do |c|
|
40
27
|
c.field :a_foo, :foo
|
41
|
-
c.field :b_foo, :foo
|
42
|
-
c.field :b_foo, :foo
|
43
28
|
end
|
44
|
-
|
29
|
+
|
30
|
+
comp.fields.keys[0].should == :a_foo
|
31
|
+
comp.fields.values[0].name.should == :a_foo
|
32
|
+
comp.fields.values[0].type.should be a
|
33
|
+
end
|
34
|
+
|
35
|
+
it "errors on duplicate field names" do
|
36
|
+
a = Cauterize.scalar(:foo)
|
37
|
+
lambda {
|
38
|
+
Cauterize.composite(:comp) do |c|
|
39
|
+
c.field :a_foo, :foo
|
40
|
+
c.field :b_foo, :foo
|
41
|
+
c.field :b_foo, :foo
|
42
|
+
end
|
43
|
+
}.should raise_error /Field name b_foo already used/
|
44
|
+
end
|
45
45
|
end
|
46
46
|
end
|
47
|
-
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
describe :composite do
|
49
|
+
it { creates_a_named_object(:composite, Composite) }
|
50
|
+
it { retrieves_obj_with_identical_name(:composite) }
|
51
|
+
it { yields_the_object(:composite) }
|
52
|
+
it { adds_object_to_hash(:composite, Cauterize.composites) }
|
53
|
+
end
|
54
|
+
|
55
|
+
describe :composite! do
|
56
|
+
it { creates_a_named_object(:composite!, Composite) }
|
57
|
+
it { raises_exception_with_identical_name(:composite!) }
|
58
|
+
it { yields_the_object(:composite!) }
|
59
|
+
it { adds_object_to_hash(:composite!, Cauterize.composites) }
|
60
|
+
end
|
55
61
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
it { yields_the_object(:composite!) }
|
60
|
-
it { adds_object_to_hash(:composite!, :composites) }
|
62
|
+
describe :composites do
|
63
|
+
it { is_hash_of_created_objs(:composite, Cauterize.composites) }
|
64
|
+
end
|
61
65
|
end
|
62
66
|
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
require 'tmpdir'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
module Cauterize
|
5
|
+
describe Cauterize::CSBuilder do
|
6
|
+
before do
|
7
|
+
@tempdir = Dir.mktmpdir
|
8
|
+
@cs_path = File.join(@tempdir, "testing.cs")
|
9
|
+
@csb = CSBuilder.new(@cs_path, "testing")
|
10
|
+
end
|
11
|
+
|
12
|
+
after do
|
13
|
+
FileUtils.rm_rf @tempdir
|
14
|
+
end
|
15
|
+
|
16
|
+
describe :build do
|
17
|
+
before do
|
18
|
+
Cauterize.set_version("1.2.3")
|
19
|
+
|
20
|
+
Cauterize.scalar(:uint8_t) { |t| t.type_name(:uint8) }
|
21
|
+
Cauterize.scalar(:uint16_t) { |t| t.type_name(:uint16) }
|
22
|
+
Cauterize.scalar(:uint32_t) { |t| t.type_name(:uint32) }
|
23
|
+
|
24
|
+
Cauterize.fixed_array(:mac_address) do |fa|
|
25
|
+
fa.array_type :uint8_t
|
26
|
+
fa.array_size 6
|
27
|
+
end
|
28
|
+
|
29
|
+
Cauterize.variable_array(:mac_table) do |t|
|
30
|
+
t.array_type :mac_address
|
31
|
+
t.array_size 64
|
32
|
+
t.size_type :uint8_t
|
33
|
+
end
|
34
|
+
|
35
|
+
Cauterize.variable_array(:name) do |va|
|
36
|
+
va.array_type :uint8_t
|
37
|
+
va.size_type :uint8_t
|
38
|
+
va.array_size 32
|
39
|
+
end
|
40
|
+
|
41
|
+
Cauterize.enumeration(:gender) do |e|
|
42
|
+
e.value :male
|
43
|
+
e.value :female
|
44
|
+
end
|
45
|
+
|
46
|
+
Cauterize.composite(:place) do |c|
|
47
|
+
c.field :name, :name
|
48
|
+
c.field :elevation, :uint32_t
|
49
|
+
end
|
50
|
+
|
51
|
+
Cauterize.composite(:person) do |c|
|
52
|
+
c.field :first_name, :name
|
53
|
+
c.field :last_name, :name
|
54
|
+
c.field :gender, :gender
|
55
|
+
end
|
56
|
+
|
57
|
+
Cauterize.composite(:dog) do |c|
|
58
|
+
c.field :name, :name
|
59
|
+
c.field :gender, :gender
|
60
|
+
c.field :leg_count, :uint8_t
|
61
|
+
end
|
62
|
+
|
63
|
+
Cauterize.group(:creature) do |g|
|
64
|
+
g.field :person, :person
|
65
|
+
g.field :dog, :dog
|
66
|
+
end
|
67
|
+
|
68
|
+
@csb.build
|
69
|
+
@cs_text = File.read(@csb.cs)
|
70
|
+
@cs_lines = @cs_text.lines.to_a
|
71
|
+
end
|
72
|
+
|
73
|
+
it "includes namespaces" do
|
74
|
+
@cs_lines.should include("using System;\n")
|
75
|
+
@cs_lines.should include("using Cauterize;\n")
|
76
|
+
end
|
77
|
+
|
78
|
+
it "uses a namespace" do
|
79
|
+
@cs_lines.should include("namespace Testing\n")
|
80
|
+
end
|
81
|
+
|
82
|
+
it "creates a cauterize info class with version and date" do
|
83
|
+
@cs_text.should match /Name = \"Testing\";/
|
84
|
+
@cs_text.should match /GeneratedVersion = \"1.2.3\";/
|
85
|
+
@cs_text.should match /GeneratedDate = /
|
86
|
+
end
|
87
|
+
|
88
|
+
it "includes enumeration definitions" do
|
89
|
+
@cs_text.should match /public enum Gender/
|
90
|
+
@cs_text.should match /Male = 0/
|
91
|
+
@cs_text.should match /Female = 1/
|
92
|
+
end
|
93
|
+
|
94
|
+
# it "can be built" do
|
95
|
+
# caut_dir = "#{File.dirname(__FILE__)}/../cs/src"
|
96
|
+
|
97
|
+
# res = Dir.chdir @tempdir do
|
98
|
+
# File.open("test_main.cs", "wb") do |fh|
|
99
|
+
# syms = BaseType.all_instances.map do |i|
|
100
|
+
# b = Builders.get(:cs, i)
|
101
|
+
# [b.packer_sym, b.unpacker_sym]
|
102
|
+
# end.flatten
|
103
|
+
# fh.write(gen_test_main(syms))
|
104
|
+
# end
|
105
|
+
|
106
|
+
# `dmcs -lib:#{caut_dir} -target:library test_main.cs 2>&1`
|
107
|
+
# end
|
108
|
+
|
109
|
+
# res.should == ""
|
110
|
+
# end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|