slather 2.6.0 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,18 @@
26
26
  buildConfiguration = "Debug"
27
27
  selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
28
  selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
29
+ shouldUseLaunchSchemeArgsEnv = "YES"
30
+ codeCoverageEnabled = "YES"
31
+ onlyGenerateCoverageForSpecifiedTargets = "YES">
32
+ <CodeCoverageTargets>
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "B1E6980125F96B670086A3E2"
36
+ BuildableName = "FixtureFramework.framework"
37
+ BlueprintName = "FixtureFramework"
38
+ ReferencedContainer = "container:fixtures.xcodeproj">
39
+ </BuildableReference>
40
+ </CodeCoverageTargets>
30
41
  <Testables>
31
42
  <TestableReference
32
43
  skipped = "NO">
@@ -39,8 +50,6 @@
39
50
  </BuildableReference>
40
51
  </TestableReference>
41
52
  </Testables>
42
- <AdditionalOptions>
43
- </AdditionalOptions>
44
53
  </TestAction>
45
54
  <LaunchAction
46
55
  buildConfiguration = "Debug"
@@ -61,8 +70,6 @@
61
70
  ReferencedContainer = "container:fixtures.xcodeproj">
62
71
  </BuildableReference>
63
72
  </MacroExpansion>
64
- <AdditionalOptions>
65
- </AdditionalOptions>
66
73
  </LaunchAction>
67
74
  <ProfileAction
68
75
  buildConfiguration = "Release"
@@ -70,6 +77,15 @@
70
77
  savedToolIdentifier = ""
71
78
  useCustomWorkingDirectory = "NO"
72
79
  debugDocumentVersioning = "YES">
80
+ <MacroExpansion>
81
+ <BuildableReference
82
+ BuildableIdentifier = "primary"
83
+ BlueprintIdentifier = "8C9A202C195965F10013B6B3"
84
+ BuildableName = "libfixtures.a"
85
+ BlueprintName = "fixtures"
86
+ ReferencedContainer = "container:fixtures.xcodeproj">
87
+ </BuildableReference>
88
+ </MacroExpansion>
73
89
  </ProfileAction>
74
90
  <AnalyzeAction
75
91
  buildConfiguration = "Debug">
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
@@ -185,8 +185,8 @@ describe Slather::CoverageService::HtmlOutput do
185
185
  end
186
186
 
187
187
  allow(fixtures_project).to receive(:input_format).and_return("profdata")
188
- allow(fixtures_project).to receive(:profdata_llvm_cov_output).and_return("./spec/fixtures/fixtures/other_fixtures.m:
189
- 1| |//
188
+ allow(fixtures_project).to receive(:pathnames_per_binary).and_return([{"filename" => Pathname.new("./spec/fixtures/fixtures/other_fixtures.m"), "segments" => []}])
189
+ allow(fixtures_project).to receive(:profdata_llvm_cov_output).and_return("1| |//
190
190
  2| |// other_fixtures.m
191
191
  3| |// fixtures
192
192
  4| |//
@@ -157,6 +157,22 @@ describe Slather::ProfdataCoverageFile do
157
157
  end
158
158
  end
159
159
 
160
+ describe "#branch_coverage_data" do
161
+ it "should have branch data for line 19" do
162
+ # these segments correspond to the only statement on line 19
163
+ profdata_coverage_file.segments = [[19, 9, 0, true, false], [19, 20, 1, true, false]]
164
+ expect(profdata_coverage_file.branch_coverage_data[19]).to eq([0,1])
165
+ end
166
+ it "should have missing region data for line 19" do
167
+ profdata_coverage_file.segments = [[19, 9, 0, true, false], [19, 20, 1, true, false]]
168
+ expect(profdata_coverage_file.branch_region_data[19]).to eq([[8,11]])
169
+ end
170
+ it "should have two missing region data for line 19" do
171
+ profdata_coverage_file.segments = [[19, 9, 0, true, false], [19, 20, 1, true, false], [19, 30, 0, true, false], [19, 40, 1, true, true]]
172
+ expect(profdata_coverage_file.branch_region_data[19]).to eq([[8,11], [29,10]])
173
+ end
174
+ end
175
+
160
176
  describe "#ignored" do
161
177
 
162
178
  before(:each) {
@@ -243,8 +243,9 @@ describe Slather::Project do
243
243
  allow(fixtures_project).to receive(:scheme).and_return("fixtures")
244
244
  fixtures_project.send(:configure_binary_file)
245
245
  binary_file_location = fixtures_project.send(:binary_file)
246
- expect(binary_file_location.count).to eq(1)
247
- expect(binary_file_location.first).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests")
246
+ expect(binary_file_location.count).to eq(2)
247
+ expect(binary_file_location.first).to end_with("Debug/FixtureFramework.framework/Versions/A/FixtureFramework")
248
+ expect(binary_file_location.last).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests")
248
249
  end
249
250
 
250
251
  it "should find the product path provided a workspace and scheme" do
@@ -252,8 +253,9 @@ describe Slather::Project do
252
253
  allow(fixtures_project).to receive(:scheme).and_return("fixtures")
253
254
  fixtures_project.send(:configure_binary_file)
254
255
  binary_file_location = fixtures_project.send(:binary_file)
255
- expect(binary_file_location.count).to eq(1)
256
- expect(binary_file_location.first).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests")
256
+ expect(binary_file_location.count).to eq(2)
257
+ expect(binary_file_location.first).to end_with("Debug/FixtureFramework.framework/Versions/A/FixtureFramework")
258
+ expect(binary_file_location.last).to end_with("Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests")
257
259
  end
258
260
 
259
261
  it "should find the product path for a scheme with no buildable products" do
@@ -664,10 +666,12 @@ describe Slather::Project do
664
666
  {
665
667
  "files":[
666
668
  {
667
- "filename":"spec/fixtures/fixtures/fixtures.m"
669
+ "filename":"spec/fixtures/fixtures/fixtures.m",
670
+ "segments": []
668
671
  },
669
672
  {
670
- "filename":"spec/fixtures/fixturesTwo/fixturesTwo.m"
673
+ "filename":"spec/fixtures/fixturesTwo/fixturesTwo.m",
674
+ "segments": []
671
675
  }
672
676
  ]
673
677
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slather
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Larsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2021-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '1.7'
159
+ version: '1.21'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '1.7'
166
+ version: '1.21'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: nokogiri
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '1.8'
173
+ version: '1.12'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '1.8'
180
+ version: '1.12'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: CFPropertyList
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -255,6 +255,12 @@ files:
255
255
  - lib/slather/project.rb
256
256
  - lib/slather/version.rb
257
257
  - slather.gemspec
258
+ - spec/fixtures/FixtureFramework/FixtureFramework.h
259
+ - spec/fixtures/FixtureFramework/FlashExperiment.swift
260
+ - spec/fixtures/FixtureFramework/Info.plist
261
+ - spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift
262
+ - spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift
263
+ - spec/fixtures/FixtureFrameworkTests/Info.plist
258
264
  - spec/fixtures/cobertura.xml
259
265
  - spec/fixtures/fixtures.xcodeproj/project.pbxproj
260
266
  - spec/fixtures/fixtures.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -264,6 +270,7 @@ files:
264
270
  - spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTestsSecond.xcscheme
265
271
  - spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTwo.xcscheme
266
272
  - spec/fixtures/fixtures.xcworkspace/contents.xcworkspacedata
273
+ - spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
267
274
  - spec/fixtures/fixtures.xcworkspace/xcshareddata/xcschemes/fixturesTestsWorkspace.xcscheme
268
275
  - spec/fixtures/fixtures/Fixtures.swift
269
276
  - spec/fixtures/fixtures/Supporting Files/fixtures-Prefix.pch
@@ -339,6 +346,12 @@ signing_key:
339
346
  specification_version: 4
340
347
  summary: Test coverage reports for Xcode projects
341
348
  test_files:
349
+ - spec/fixtures/FixtureFramework/FixtureFramework.h
350
+ - spec/fixtures/FixtureFramework/FlashExperiment.swift
351
+ - spec/fixtures/FixtureFramework/Info.plist
352
+ - spec/fixtures/FixtureFrameworkTests/FixtureFrameworkTests.swift
353
+ - spec/fixtures/FixtureFrameworkTests/FlashExperimentTests.swift
354
+ - spec/fixtures/FixtureFrameworkTests/Info.plist
342
355
  - spec/fixtures/cobertura.xml
343
356
  - spec/fixtures/fixtures.xcodeproj/project.pbxproj
344
357
  - spec/fixtures/fixtures.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -348,6 +361,7 @@ test_files:
348
361
  - spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTestsSecond.xcscheme
349
362
  - spec/fixtures/fixtures.xcodeproj/xcshareddata/xcschemes/fixturesTwo.xcscheme
350
363
  - spec/fixtures/fixtures.xcworkspace/contents.xcworkspacedata
364
+ - spec/fixtures/fixtures.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
351
365
  - spec/fixtures/fixtures.xcworkspace/xcshareddata/xcschemes/fixturesTestsWorkspace.xcscheme
352
366
  - spec/fixtures/fixtures/Fixtures.swift
353
367
  - spec/fixtures/fixtures/Supporting Files/fixtures-Prefix.pch