Skip to content

Commit

Permalink
Merge pull request #5 from lukepistrol/main
Browse files Browse the repository at this point in the history
added `breakpoint` & `breakpoint.fill` symbol
  • Loading branch information
lukepistrol authored Apr 19, 2022
2 parents 4a98615 + 618019e commit 7d37a9b
Show file tree
Hide file tree
Showing 10 changed files with 394 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/CodeEditSymbols/CodeEditSymbols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public extension Image {
static let vault_fill: Image = .init(symbol: "vault.fill")
static let commit: Image = .init(symbol: "commit")
static let checkout: Image = .init(symbol: "checkout")
static let breakpoint: Image = .init(symbol: "breakpoint")
static let breakpoint_fill: Image = .init(symbol: "breakpoint.fill")

// add static properties for your symbols above this line

Expand All @@ -41,6 +43,8 @@ public extension NSImage {
static let vault_fill: NSImage = .symbol(named: "vault.fill")
static let commit: NSImage = .symbol(named: "commit")
static let checkout: NSImage = .symbol(named: "checkout")
static let breakpoint: NSImage = .symbol(named: "breakpoint")
static let breakpoint_fill: NSImage = .symbol(named: "breakpoint.fill")

// add static properties for your symbols above this line

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"symbols" : [
{
"filename" : "breakpoint.fill.svg",
"idiom" : "universal"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"symbols" : [
{
"filename" : "breakpoint.svg",
"idiom" : "universal"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ final class CodeEditSymbolsTests: XCTestCase {
assertSnapshot(matching: view, as: .image, record: record)
}

// MARK: BREAKPOINT

func testCreateNSImageBreakpoint() {
let image = NSImage.breakpoint
let view = NSImageView(image: image)
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image, record: record)
}

func testCreateNSImageBreakpointFill() {
let image = NSImage.breakpoint_fill
let view = NSImageView(image: image)
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image, record: record)
}

// MARK: - Image Tests

// MARK: VAULT
Expand Down Expand Up @@ -78,4 +94,20 @@ final class CodeEditSymbolsTests: XCTestCase {
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record)
}

// MARK: BREAKPOINT

func testCreateImageBreakpoint() {
let image = Image.breakpoint
let view: NSView = NSHostingController(rootView: image).view
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record)
}

func testCreateImageBreakpointFill() {
let image = Image.breakpoint_fill
let view: NSView = NSHostingController(rootView: image).view
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7d37a9b

Please sign in to comment.