Skip to content

Commit c353e31

Browse files
committed
Fixed unit tests
1 parent 18f8912 commit c353e31

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ColorSetKit/ColorSet.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ import Cocoa
5454
}
5555
}
5656

57+
#if DEBUG
58+
59+
/* For unit tests... */
60+
if set == nil, let path = Bundle( identifier: "com.xs-labs.ColorSetKit-Test" )?.path( forResource: "Colors", ofType: "colorset" )
61+
{
62+
if FileManager.default.fileExists( atPath: path )
63+
{
64+
set = ColorSet( path: path )
65+
}
66+
}
67+
68+
#endif
69+
5770
return set ?? ColorSet()
5871
}()
5972

0 commit comments

Comments
 (0)