Skip to content

Commit

Permalink
Add verbose logging for test case and group initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Brotcke committed Jan 3, 2024
1 parent 7ad32a5 commit 29b65ec
Show file tree
Hide file tree
Showing 246 changed files with 6,972 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>XK98WVAH5W.com.tito.XCTestHTMLReportSampleApp</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>colors</key>
<array/>
<key>images</key>
<array/>
<key>symbols</key>
<array/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#import <Foundation/Foundation.h>

#if __has_attribute(swift_private)
#define AC_SWIFT_PRIVATE __attribute__((swift_private))
#else
#define AC_SWIFT_PRIVATE
#endif

#undef AC_SWIFT_PRIVATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
import Foundation
#if canImport(AppKit)
import AppKit
#endif
#if canImport(UIKit)
import UIKit
#endif
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(DeveloperToolsSupport)
import DeveloperToolsSupport
#endif

#if SWIFT_PACKAGE
private let resourceBundle = Foundation.Bundle.module
#else
private class ResourceBundleClass {}
private let resourceBundle = Foundation.Bundle(for: ResourceBundleClass.self)
#endif

// MARK: - Color Symbols -

@available(iOS 11.0, macOS 10.13, tvOS 11.0, *)
extension ColorResource {

}

// MARK: - Image Symbols -

@available(iOS 11.0, macOS 10.7, tvOS 11.0, *)
extension ImageResource {

}

// MARK: - Backwards Deployment Support -

/// A color resource.
struct ColorResource: Hashable {

/// An asset catalog color resource name.
fileprivate let name: String

/// An asset catalog color resource bundle.
fileprivate let bundle: Bundle

/// Initialize a `ColorResource` with `name` and `bundle`.
init(name: String, bundle: Bundle) {
self.name = name
self.bundle = bundle
}

}

/// An image resource.
struct ImageResource: Hashable {

/// An asset catalog image resource name.
fileprivate let name: String

/// An asset catalog image resource bundle.
fileprivate let bundle: Bundle

/// Initialize an `ImageResource` with `name` and `bundle`.
init(name: String, bundle: Bundle) {
self.name = name
self.bundle = bundle
}

}

#if canImport(AppKit)
@available(macOS 10.13, *)
@available(macCatalyst, unavailable)
extension AppKit.NSColor {

/// Initialize a `NSColor` with a color resource.
convenience init(resource: ColorResource) {
self.init(named: NSColor.Name(resource.name), bundle: resource.bundle)!
}

}

protocol _ACResourceInitProtocol {}
extension AppKit.NSImage: _ACResourceInitProtocol {}

@available(macOS 10.7, *)
@available(macCatalyst, unavailable)
extension _ACResourceInitProtocol {

/// Initialize a `NSImage` with an image resource.
init(resource: ImageResource) {
self = resource.bundle.image(forResource: NSImage.Name(resource.name))! as! Self
}

}
#endif

#if canImport(UIKit)
@available(iOS 11.0, tvOS 11.0, *)
@available(watchOS, unavailable)
extension UIKit.UIColor {

/// Initialize a `UIColor` with a color resource.
convenience init(resource: ColorResource) {
#if !os(watchOS)
self.init(named: resource.name, in: resource.bundle, compatibleWith: nil)!
#else
self.init()
#endif
}

}

@available(iOS 11.0, tvOS 11.0, *)
@available(watchOS, unavailable)
extension UIKit.UIImage {

/// Initialize a `UIImage` with an image resource.
convenience init(resource: ImageResource) {
#if !os(watchOS)
self.init(named: resource.name, in: resource.bundle, compatibleWith: nil)!
#else
self.init()
#endif
}

}
#endif

#if canImport(SwiftUI)
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
extension SwiftUI.Color {

/// Initialize a `Color` with a color resource.
init(_ resource: ColorResource) {
self.init(resource.name, bundle: resource.bundle)
}

}

@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
extension SwiftUI.Image {

/// Initialize an `Image` with an image resource.
init(_ resource: ImageResource) {
self.init(resource.name, bundle: resource.bundle)
}

}
#endif
Loading

0 comments on commit 29b65ec

Please sign in to comment.