Skip to content

Commit 2aaa311

Browse files
Added branch symbol (#13)
1 parent ec12509 commit 2aaa311

File tree

4 files changed

+133
-0
lines changed

4 files changed

+133
-0
lines changed

Sources/CodeEditSymbols/CodeEditSymbols.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public extension Image {
2020
static let vault_fill: Image = .init(symbol: "vault.fill")
2121
static let commit: Image = .init(symbol: "commit")
2222
static let checkout: Image = .init(symbol: "checkout")
23+
static let branch: Image = .init(symbol: "branch")
2324
static let breakpoint: Image = .init(symbol: "breakpoint")
2425
static let breakpoint_fill: Image = .init(symbol: "breakpoint.fill")
2526
static let customChevronUpChevronDown: Image = .init(symbol: "custom.chevron.up.chevron.down")
@@ -45,6 +46,7 @@ public extension NSImage {
4546
static let vault_fill: NSImage = .symbol(named: "vault.fill")
4647
static let commit: NSImage = .symbol(named: "commit")
4748
static let checkout: NSImage = .symbol(named: "checkout")
49+
static let branch: NSImage = .symbol(named: "branch")
4850
static let breakpoint: NSImage = .symbol(named: "breakpoint")
4951
static let breakpoint_fill: NSImage = .symbol(named: "breakpoint.fill")
5052
static let customChevronUpChevronDown: NSImage = .symbol(named: "custom.chevron.up.chevron.down")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
},
6+
"symbols" : [
7+
{
8+
"filename" : "branch.svg",
9+
"idiom" : "universal"
10+
}
11+
]
12+
}
Lines changed: 101 additions & 0 deletions
Loading

Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ final class CodeEditSymbolsTests: XCTestCase {
4343
assertSnapshot(matching: view, as: .image, record: record)
4444
}
4545

46+
// MARK: BRANCH
47+
48+
func testCreateNSImageBranch() {
49+
let image = NSImage.branch
50+
let view = NSImageView(image: image)
51+
view.appearance = .init(named: .aqua)
52+
assertSnapshot(matching: view, as: .image, record: record)
53+
}
54+
4655
// MARK: BREAKPOINT
4756

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

114+
// MARK: BRANCH
115+
116+
func testCreateImageBranch() {
117+
let image = Image.branch
118+
let view: NSView = NSHostingController(rootView: image).view
119+
view.appearance = .init(named: .aqua)
120+
assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record)
121+
}
122+
105123
// MARK: BREAKPOINT
106124

107125
func testCreateImageBreakpoint() {

0 commit comments

Comments
 (0)