Skip to content

Commit

Permalink
Added branch symbol (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
austincondiff authored Nov 26, 2023
1 parent ec12509 commit 2aaa311
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/CodeEditSymbols/CodeEditSymbols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ 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 branch: Image = .init(symbol: "branch")
static let breakpoint: Image = .init(symbol: "breakpoint")
static let breakpoint_fill: Image = .init(symbol: "breakpoint.fill")
static let customChevronUpChevronDown: Image = .init(symbol: "custom.chevron.up.chevron.down")
Expand All @@ -45,6 +46,7 @@ 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 branch: NSImage = .symbol(named: "branch")
static let breakpoint: NSImage = .symbol(named: "breakpoint")
static let breakpoint_fill: NSImage = .symbol(named: "breakpoint.fill")
static let customChevronUpChevronDown: NSImage = .symbol(named: "custom.chevron.up.chevron.down")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"symbols" : [
{
"filename" : "branch.svg",
"idiom" : "universal"
}
]
}
101 changes: 101 additions & 0 deletions Sources/CodeEditSymbols/Symbols.xcassets/branch.symbolset/branch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ final class CodeEditSymbolsTests: XCTestCase {
assertSnapshot(matching: view, as: .image, record: record)
}

// MARK: BRANCH

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

// MARK: BREAKPOINT

func testCreateNSImageBreakpoint() {
Expand Down Expand Up @@ -102,6 +111,15 @@ final class CodeEditSymbolsTests: XCTestCase {
assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record)
}

// MARK: BRANCH

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

// MARK: BREAKPOINT

func testCreateImageBreakpoint() {
Expand Down

0 comments on commit 2aaa311

Please sign in to comment.