zerg_xcode 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. data/CHANGELOG +2 -0
  2. data/Manifest +22 -14
  3. data/Rakefile +6 -0
  4. data/lib/zerg_xcode.rb +8 -3
  5. data/lib/zerg_xcode/builder/runner.rb +51 -0
  6. data/lib/zerg_xcode/builder/sdks.rb +34 -0
  7. data/lib/zerg_xcode/file_format/archiver.rb +15 -2
  8. data/lib/zerg_xcode/file_format/encoder.rb +15 -2
  9. data/lib/zerg_xcode/file_format/lexer.rb +15 -2
  10. data/lib/zerg_xcode/file_format/parser.rb +15 -2
  11. data/lib/zerg_xcode/file_format/paths.rb +15 -2
  12. data/lib/zerg_xcode/objects/pbx_build_file.rb +16 -3
  13. data/lib/zerg_xcode/objects/pbx_build_phase.rb +14 -2
  14. data/lib/zerg_xcode/objects/pbx_container_item_proxy.rb +14 -2
  15. data/lib/zerg_xcode/objects/pbx_group.rb +43 -3
  16. data/lib/zerg_xcode/objects/pbx_native_target.rb +15 -3
  17. data/lib/zerg_xcode/objects/pbx_project.rb +20 -4
  18. data/lib/zerg_xcode/objects/pbx_target_dependency.rb +15 -3
  19. data/lib/zerg_xcode/objects/xc_configuration_list.rb +14 -2
  20. data/lib/zerg_xcode/objects/xcode_object.rb +14 -3
  21. data/lib/zerg_xcode/plugins/addlibrary.rb +15 -2
  22. data/lib/zerg_xcode/plugins/core/core.rb +15 -6
  23. data/lib/zerg_xcode/plugins/help.rb +15 -2
  24. data/lib/zerg_xcode/plugins/import.rb +15 -2
  25. data/lib/zerg_xcode/plugins/irb.rb +16 -2
  26. data/lib/zerg_xcode/plugins/ls.rb +15 -2
  27. data/lib/zerg_xcode/plugins/lstargets.rb +16 -2
  28. data/lib/zerg_xcode/plugins/retarget.rb +15 -2
  29. data/lib/zerg_xcode/shortcuts.rb +10 -2
  30. data/test/builder/runner_test.rb +35 -0
  31. data/test/builder/sdk_test.rb +17 -0
  32. data/test/file_format/archiver_test.rb +6 -2
  33. data/test/file_format/encoder_test.rb +7 -3
  34. data/test/file_format/lexer_test.rb +7 -3
  35. data/test/file_format/parser_test.rb +6 -2
  36. data/test/file_format/path_test.rb +30 -24
  37. data/test/fixtures/ClosedLib/ClosedLib.xcodeproj/project.pbxproj +225 -0
  38. data/test/fixtures/ClosedLib/ClosedLib_Prefix.pch +7 -0
  39. data/test/fixtures/ClosedLib/ClosedNative.c +20 -0
  40. data/test/fixtures/ClosedLib/ClosedNative.h +12 -0
  41. data/{testdata → test/fixtures}/FlatTestApp/FlatTestApp.xcodeproj/project.pbxproj +0 -0
  42. data/{testdata → test/fixtures}/TestApp/TestApp.xcodeproj/project.pbxproj +0 -0
  43. data/{testdata → test/fixtures}/TestApp30.xcodeproj/project.pbxproj +0 -0
  44. data/{testdata → test/fixtures}/TestLib30.xcodeproj/project.pbxproj +0 -0
  45. data/{testdata → test/fixtures}/ZergSupport.xcodeproj/project.pbxproj +0 -0
  46. data/{testdata → test/fixtures}/project.pbxproj +0 -0
  47. data/{testdata → test/fixtures}/project.pbxproj.compat +0 -0
  48. data/test/objects/pbx_build_file_test.rb +7 -4
  49. data/test/objects/pbx_build_phase_test.rb +5 -2
  50. data/test/objects/pbx_container_item_proxy_test.rb +6 -2
  51. data/test/objects/pbx_group_test.rb +35 -3
  52. data/test/objects/pbx_native_target_test.rb +5 -2
  53. data/test/objects/pbx_project_test.rb +21 -9
  54. data/test/objects/pbx_target_dependency_test.rb +6 -2
  55. data/test/objects/xc_configuration_list_test.rb +5 -2
  56. data/test/objects/xcode_object_test.rb +5 -2
  57. data/test/plugins/addlibrary_test.rb +6 -3
  58. data/test/plugins/core/core_test.rb +5 -2
  59. data/test/plugins/helper.rb +4 -0
  60. data/test/plugins/import_test.rb +76 -72
  61. data/test/plugins/irb_test.rb +9 -4
  62. data/test/plugins/ls_test.rb +7 -4
  63. data/test/plugins/lstargets_test.rb +7 -4
  64. data/test/plugins/retarget_test.rb +7 -4
  65. data/test/shortcuts_test.rb +7 -3
  66. data/zerg_xcode.gemspec +6 -6
  67. metadata +32 -20
@@ -1,9 +1,13 @@
1
- require 'test/unit'
1
+ # Author:: Victor Costan
2
+ # Copyright:: Copyright (C) 2009 Zergling.Net
3
+ # License:: MIT
4
+
2
5
  require 'zerg_xcode'
6
+ require 'test/unit'
3
7
 
4
8
  class LexerTest < Test::Unit::TestCase
5
9
  def test_lexer
6
- pbxdata = File.read 'testdata/project.pbxproj'
10
+ pbxdata = File.read 'test/fixtures/project.pbxproj'
7
11
  golden_starts = [[:encoding, "UTF8"],
8
12
  :begin_hash,
9
13
  [:symbol, "archiveVersion"], :assign, [:symbol, "1"],
@@ -48,7 +52,7 @@ class LexerTest < Test::Unit::TestCase
48
52
  end
49
53
 
50
54
  def test_escaped_string
51
- pbxdata = File.read 'testdata/ZergSupport.xcodeproj/project.pbxproj'
55
+ pbxdata = File.read 'test/fixtures/ZergSupport.xcodeproj/project.pbxproj'
52
56
  tokens = ZergXcode::Lexer.tokenize pbxdata
53
57
  assert tokens.include?([:string,
54
58
  "\"$(SRCROOT)/build/Debug-iphonesimulator\""])
@@ -1,9 +1,13 @@
1
- require 'test/unit'
1
+ # Author:: Victor Costan
2
+ # Copyright:: Copyright (C) 2009 Zergling.Net
3
+ # License:: MIT
4
+
2
5
  require 'zerg_xcode'
6
+ require 'test/unit'
3
7
 
4
8
  class ParserTest < Test::Unit::TestCase
5
9
  def test_parser
6
- pbxdata = File.read 'testdata/project.pbxproj'
10
+ pbxdata = File.read 'test/fixtures/project.pbxproj'
7
11
  proj = ZergXcode::Parser.parse pbxdata
8
12
 
9
13
  assert proj.kind_of?(Hash), 'Project structure should be a hash'
@@ -1,41 +1,47 @@
1
- require 'test/unit'
1
+ # Author:: Victor Costan
2
+ # Copyright:: Copyright (C) 2009 Zergling.Net
3
+ # License:: MIT
4
+
2
5
  require 'zerg_xcode'
6
+ require 'test/unit'
3
7
 
4
8
  class PathTest < Test::Unit::TestCase
5
9
  Paths = ZergXcode::Paths
6
10
 
7
11
  def test_project_file_at
8
- assert_equal 'testdata/ZergSupport.xcodeproj/project.pbxproj',
9
- Paths.project_file_at('testdata/ZergSupport'), 'short'
10
- assert_equal 'testdata/ZergSupport.xcodeproj/project.pbxproj',
11
- Paths.project_file_at('testdata/ZergSupport.xcodeproj'),
12
+ assert_equal 'test/fixtures/ZergSupport.xcodeproj/project.pbxproj',
13
+ Paths.project_file_at('test/fixtures/ZergSupport'), 'short'
14
+ assert_equal 'test/fixtures/ZergSupport.xcodeproj/project.pbxproj',
15
+ Paths.project_file_at('test/fixtures/ZergSupport.xcodeproj'),
12
16
  'full project name'
13
- assert_equal 'testdata/project.pbxproj',
14
- Paths.project_file_at('testdata'),
17
+ assert_equal 'test/fixtures/project.pbxproj',
18
+ Paths.project_file_at('test/fixtures'),
15
19
  'enclosing dir with weird name'
16
- assert_equal './testdata/project.pbxproj',
17
- Paths.project_file_at('.'),
20
+ assert_equal 'test/fixtures/project.pbxproj',
21
+ Paths.project_file_at('test'),
18
22
  'subdir with weird name'
19
- assert_equal 'testdata/TestApp/TestApp.xcodeproj/project.pbxproj',
20
- Paths.project_file_at('testdata/TestApp'), 'project in subdir'
21
- assert_equal 'testdata/TestApp/TestApp.xcodeproj/project.pbxproj',
22
- Paths.project_file_at('testdata/TestApp/TestApp.xcodeproj'),
23
- 'full project name in subdir'
23
+ assert_equal 'test/fixtures/TestApp/TestApp.xcodeproj/project.pbxproj',
24
+ Paths.project_file_at('test/fixtures/TestApp'),
25
+ 'project in subdir'
26
+ assert_equal 'test/fixtures/TestApp/TestApp.xcodeproj/project.pbxproj',
27
+ Paths.project_file_at('test/fixtures/TestApp/TestApp.xcodeproj'),
28
+ 'full project name in subdir'
24
29
  end
25
30
 
26
31
  def test_project_root_at
27
- assert_equal 'testdata', Paths.project_root_at('testdata/ZergSupport'),
32
+ assert_equal 'test/fixtures',
33
+ Paths.project_root_at('test/fixtures/ZergSupport'),
28
34
  'short project name'
29
- assert_equal 'testdata',
30
- Paths.project_root_at('testdata/ZergSupport.xcodeproj'),
35
+ assert_equal 'test/fixtures',
36
+ Paths.project_root_at('test/fixtures/ZergSupport.xcodeproj'),
31
37
  'full project name'
32
- assert_equal '.', Paths.project_root_at('testdata'),
38
+ assert_equal 'test', Paths.project_root_at('test/fixtures'),
33
39
  'enclosing dir with weird name'
34
- assert_equal '.', Paths.project_root_at('.'), 'subdir with weird name'
35
- assert_equal 'testdata/TestApp',
36
- Paths.project_root_at('testdata/TestApp'), 'project dir'
37
- assert_equal 'testdata/TestApp',
38
- Paths.project_root_at('testdata/TestApp/TestApp.xcodeproj'),
39
- 'full project name in subdir'
40
+ assert_equal 'test', Paths.project_root_at('test'), 'subdir with weird name'
41
+ assert_equal 'test/fixtures/TestApp',
42
+ Paths.project_root_at('test/fixtures/TestApp'), 'project dir'
43
+ assert_equal 'test/fixtures/TestApp',
44
+ Paths.project_root_at('test/fixtures/TestApp/TestApp.xcodeproj'),
45
+ 'full project name in subdir'
40
46
  end
41
47
  end
@@ -0,0 +1,225 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 45;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 5729343110CB6BA000FB901C /* ClosedNative.h in Headers */ = {isa = PBXBuildFile; fileRef = 5729342F10CB6BA000FB901C /* ClosedNative.h */; settings = {ATTRIBUTES = (Public, ); }; };
11
+ 5729343210CB6BA000FB901C /* ClosedNative.c in Sources */ = {isa = PBXBuildFile; fileRef = 5729343010CB6BA000FB901C /* ClosedNative.c */; };
12
+ AA747D9F0F9514B9006C5449 /* ClosedLib_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* ClosedLib_Prefix.pch */; };
13
+ AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
14
+ /* End PBXBuildFile section */
15
+
16
+ /* Begin PBXFileReference section */
17
+ 5729342F10CB6BA000FB901C /* ClosedNative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClosedNative.h; sourceTree = "<group>"; };
18
+ 5729343010CB6BA000FB901C /* ClosedNative.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ClosedNative.c; sourceTree = "<group>"; };
19
+ AA747D9E0F9514B9006C5449 /* ClosedLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClosedLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
20
+ AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
21
+ D2AAC07E0554694100DB518D /* libClosedLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libClosedLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
22
+ /* End PBXFileReference section */
23
+
24
+ /* Begin PBXFrameworksBuildPhase section */
25
+ D2AAC07C0554694100DB518D /* Frameworks */ = {
26
+ isa = PBXFrameworksBuildPhase;
27
+ buildActionMask = 2147483647;
28
+ files = (
29
+ AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
30
+ );
31
+ runOnlyForDeploymentPostprocessing = 0;
32
+ };
33
+ /* End PBXFrameworksBuildPhase section */
34
+
35
+ /* Begin PBXGroup section */
36
+ 034768DFFF38A50411DB9C8B /* Products */ = {
37
+ isa = PBXGroup;
38
+ children = (
39
+ D2AAC07E0554694100DB518D /* libClosedLib.a */,
40
+ );
41
+ name = Products;
42
+ sourceTree = "<group>";
43
+ };
44
+ 0867D691FE84028FC02AAC07 /* ClosedLib */ = {
45
+ isa = PBXGroup;
46
+ children = (
47
+ 08FB77AEFE84172EC02AAC07 /* Classes */,
48
+ 32C88DFF0371C24200C91783 /* Other Sources */,
49
+ 0867D69AFE84028FC02AAC07 /* Frameworks */,
50
+ 034768DFFF38A50411DB9C8B /* Products */,
51
+ );
52
+ name = ClosedLib;
53
+ sourceTree = "<group>";
54
+ };
55
+ 0867D69AFE84028FC02AAC07 /* Frameworks */ = {
56
+ isa = PBXGroup;
57
+ children = (
58
+ AACBBE490F95108600F1A2B1 /* Foundation.framework */,
59
+ );
60
+ name = Frameworks;
61
+ sourceTree = "<group>";
62
+ };
63
+ 08FB77AEFE84172EC02AAC07 /* Classes */ = {
64
+ isa = PBXGroup;
65
+ children = (
66
+ 5729342F10CB6BA000FB901C /* ClosedNative.h */,
67
+ 5729343010CB6BA000FB901C /* ClosedNative.c */,
68
+ );
69
+ name = Classes;
70
+ sourceTree = "<group>";
71
+ };
72
+ 32C88DFF0371C24200C91783 /* Other Sources */ = {
73
+ isa = PBXGroup;
74
+ children = (
75
+ AA747D9E0F9514B9006C5449 /* ClosedLib_Prefix.pch */,
76
+ );
77
+ name = "Other Sources";
78
+ sourceTree = "<group>";
79
+ };
80
+ /* End PBXGroup section */
81
+
82
+ /* Begin PBXHeadersBuildPhase section */
83
+ D2AAC07A0554694100DB518D /* Headers */ = {
84
+ isa = PBXHeadersBuildPhase;
85
+ buildActionMask = 2147483647;
86
+ files = (
87
+ AA747D9F0F9514B9006C5449 /* ClosedLib_Prefix.pch in Headers */,
88
+ 5729343110CB6BA000FB901C /* ClosedNative.h in Headers */,
89
+ );
90
+ runOnlyForDeploymentPostprocessing = 0;
91
+ };
92
+ /* End PBXHeadersBuildPhase section */
93
+
94
+ /* Begin PBXNativeTarget section */
95
+ D2AAC07D0554694100DB518D /* ClosedLib */ = {
96
+ isa = PBXNativeTarget;
97
+ buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "ClosedLib" */;
98
+ buildPhases = (
99
+ D2AAC07A0554694100DB518D /* Headers */,
100
+ D2AAC07B0554694100DB518D /* Sources */,
101
+ D2AAC07C0554694100DB518D /* Frameworks */,
102
+ );
103
+ buildRules = (
104
+ );
105
+ dependencies = (
106
+ );
107
+ name = ClosedLib;
108
+ productName = ClosedLib;
109
+ productReference = D2AAC07E0554694100DB518D /* libClosedLib.a */;
110
+ productType = "com.apple.product-type.library.static";
111
+ };
112
+ /* End PBXNativeTarget section */
113
+
114
+ /* Begin PBXProject section */
115
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
116
+ isa = PBXProject;
117
+ buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ClosedLib" */;
118
+ compatibilityVersion = "Xcode 3.1";
119
+ hasScannedForEncodings = 1;
120
+ mainGroup = 0867D691FE84028FC02AAC07 /* ClosedLib */;
121
+ productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
122
+ projectDirPath = "";
123
+ projectRoot = "";
124
+ targets = (
125
+ D2AAC07D0554694100DB518D /* ClosedLib */,
126
+ );
127
+ };
128
+ /* End PBXProject section */
129
+
130
+ /* Begin PBXSourcesBuildPhase section */
131
+ D2AAC07B0554694100DB518D /* Sources */ = {
132
+ isa = PBXSourcesBuildPhase;
133
+ buildActionMask = 2147483647;
134
+ files = (
135
+ 5729343210CB6BA000FB901C /* ClosedNative.c in Sources */,
136
+ );
137
+ runOnlyForDeploymentPostprocessing = 0;
138
+ };
139
+ /* End PBXSourcesBuildPhase section */
140
+
141
+ /* Begin XCBuildConfiguration section */
142
+ 1DEB921F08733DC00010E9CD /* Debug */ = {
143
+ isa = XCBuildConfiguration;
144
+ buildSettings = {
145
+ ALWAYS_SEARCH_USER_PATHS = NO;
146
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
147
+ COPY_PHASE_STRIP = NO;
148
+ DSTROOT = /tmp/ClosedLib.dst;
149
+ GCC_DYNAMIC_NO_PIC = NO;
150
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
151
+ GCC_MODEL_TUNING = G5;
152
+ GCC_OPTIMIZATION_LEVEL = 0;
153
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
154
+ GCC_PREFIX_HEADER = ClosedLib_Prefix.pch;
155
+ INSTALL_PATH = /usr/local/lib;
156
+ PRODUCT_NAME = ClosedLib;
157
+ };
158
+ name = Debug;
159
+ };
160
+ 1DEB922008733DC00010E9CD /* Release */ = {
161
+ isa = XCBuildConfiguration;
162
+ buildSettings = {
163
+ ALWAYS_SEARCH_USER_PATHS = NO;
164
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
165
+ DSTROOT = /tmp/ClosedLib.dst;
166
+ GCC_MODEL_TUNING = G5;
167
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
168
+ GCC_PREFIX_HEADER = ClosedLib_Prefix.pch;
169
+ INSTALL_PATH = /usr/local/lib;
170
+ PRODUCT_NAME = ClosedLib;
171
+ };
172
+ name = Release;
173
+ };
174
+ 1DEB922308733DC00010E9CD /* Debug */ = {
175
+ isa = XCBuildConfiguration;
176
+ buildSettings = {
177
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
178
+ GCC_C_LANGUAGE_STANDARD = c99;
179
+ GCC_OPTIMIZATION_LEVEL = 0;
180
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
181
+ GCC_WARN_UNUSED_VARIABLE = YES;
182
+ OTHER_LDFLAGS = "-ObjC";
183
+ PREBINDING = NO;
184
+ SDKROOT = iphoneos3.1.2;
185
+ };
186
+ name = Debug;
187
+ };
188
+ 1DEB922408733DC00010E9CD /* Release */ = {
189
+ isa = XCBuildConfiguration;
190
+ buildSettings = {
191
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
192
+ GCC_C_LANGUAGE_STANDARD = c99;
193
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
194
+ GCC_WARN_UNUSED_VARIABLE = YES;
195
+ OTHER_LDFLAGS = "-ObjC";
196
+ PREBINDING = NO;
197
+ SDKROOT = iphoneos3.1.2;
198
+ };
199
+ name = Release;
200
+ };
201
+ /* End XCBuildConfiguration section */
202
+
203
+ /* Begin XCConfigurationList section */
204
+ 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "ClosedLib" */ = {
205
+ isa = XCConfigurationList;
206
+ buildConfigurations = (
207
+ 1DEB921F08733DC00010E9CD /* Debug */,
208
+ 1DEB922008733DC00010E9CD /* Release */,
209
+ );
210
+ defaultConfigurationIsVisible = 0;
211
+ defaultConfigurationName = Release;
212
+ };
213
+ 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ClosedLib" */ = {
214
+ isa = XCConfigurationList;
215
+ buildConfigurations = (
216
+ 1DEB922308733DC00010E9CD /* Debug */,
217
+ 1DEB922408733DC00010E9CD /* Release */,
218
+ );
219
+ defaultConfigurationIsVisible = 0;
220
+ defaultConfigurationName = Release;
221
+ };
222
+ /* End XCConfigurationList section */
223
+ };
224
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
225
+ }
@@ -0,0 +1,7 @@
1
+ //
2
+ // Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project.
3
+ //
4
+
5
+ #ifdef __OBJC__
6
+ #import <Foundation/Foundation.h>
7
+ #endif
@@ -0,0 +1,20 @@
1
+ /*
2
+ * ClosedNative.c
3
+ * ClosedLib
4
+ *
5
+ * Created by Victor Costan on 12/5/09.
6
+ * Copyright 2009 Zergling.Net. All rights reserved.
7
+ *
8
+ */
9
+
10
+ #include "closedNative.h"
11
+
12
+ #include <stdlib.h>
13
+ #include <string.h>
14
+
15
+ static char helloString[] = "Hello world!\n";
16
+ void copyHello(char* buffer, size_t bufferSize) {
17
+ if (bufferSize >= strlen(helloString) + 1) {
18
+ strcpy(helloString, buffer);
19
+ }
20
+ }
@@ -0,0 +1,12 @@
1
+ /*
2
+ * ClosedNative.h
3
+ * ClosedLib
4
+ *
5
+ * Created by Victor Costan on 12/5/09.
6
+ * Copyright 2009 Zergling.Net. All rights reserved.
7
+ *
8
+ */
9
+
10
+ #include <stdlib.h>
11
+
12
+ void copyHello(char* buffer, size_t bufferSize);
File without changes
File without changes
@@ -1,12 +1,15 @@
1
- require 'test/unit'
1
+ # Author:: Victor Costan
2
+ # Copyright:: Copyright (C) 2009 Zergling.Net
3
+ # License:: MIT
2
4
 
3
5
  require 'zerg_xcode'
6
+ require 'test/unit'
4
7
 
5
8
  class PBXBuildFileTest < Test::Unit::TestCase
6
9
  PBXBuildFile = ZergXcode::Objects::PBXBuildFile
7
10
 
8
11
  def setup
9
- @target = ZergXcode.load('testdata/project.pbxproj')['targets'].first
12
+ @target = ZergXcode.load('test/fixtures/project.pbxproj')['targets'].first
10
13
  @sources_phase = @target['buildPhases'][1]
11
14
  @build_file = @sources_phase['files'].first
12
15
  end
@@ -16,7 +19,7 @@ class PBXBuildFileTest < Test::Unit::TestCase
16
19
  assert_equal 'main.m', @build_file.filename
17
20
  assert_equal 'sourcecode.c.objc', @build_file.file_type
18
21
 
19
- big_project = ZergXcode.load('testdata/ZergSupport')
22
+ big_project = ZergXcode.load('test/fixtures/ZergSupport')
20
23
  big_project['targets'].map { |t| t.all_files }.flatten.each do |file|
21
24
  assert_not_nil file[:build_object].file_type,
22
25
  "No file type for #{file[:build_object].inspect}"
@@ -24,7 +27,7 @@ class PBXBuildFileTest < Test::Unit::TestCase
24
27
  end
25
28
 
26
29
  def test_guessed_build_phase_type
27
- big_project = ZergXcode.load('testdata/ZergSupport')
30
+ big_project = ZergXcode.load('test/fixtures/ZergSupport')
28
31
 
29
32
  phases = @target['buildPhases'] +
30
33
  big_project['targets'].map { |t| t['buildPhases'] }.flatten
@@ -1,12 +1,15 @@
1
- require 'test/unit'
1
+ # Author:: Victor Costan
2
+ # Copyright:: Copyright (C) 2009 Zergling.Net
3
+ # License:: MIT
2
4
 
3
5
  require 'zerg_xcode'
6
+ require 'test/unit'
4
7
 
5
8
  class PBXBuildPhaseTest < Test::Unit::TestCase
6
9
  PBXBuildPhase = ZergXcode::Objects::PBXBuildPhase
7
10
 
8
11
  def setup
9
- @target = ZergXcode.load('testdata/project.pbxproj')['targets'].first
12
+ @target = ZergXcode.load('test/fixtures/project.pbxproj')['targets'].first
10
13
  @sources_phase = @target['buildPhases'][1]
11
14
  end
12
15