Skip to content

Commit e6ceda1

Browse files
committed
wip
1 parent 8622b1e commit e6ceda1

16 files changed

Lines changed: 1273 additions & 0 deletions

File tree

Example/Example.xcodeproj/project.pbxproj

Lines changed: 608 additions & 0 deletions
Large diffs are not rendered by default.

Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"platform" : "ios",
6+
"size" : "1024x1024"
7+
},
8+
{
9+
"appearances" : [
10+
{
11+
"appearance" : "luminosity",
12+
"value" : "dark"
13+
}
14+
],
15+
"idiom" : "universal",
16+
"platform" : "ios",
17+
"size" : "1024x1024"
18+
},
19+
{
20+
"appearances" : [
21+
{
22+
"appearance" : "luminosity",
23+
"value" : "tinted"
24+
}
25+
],
26+
"idiom" : "universal",
27+
"platform" : "ios",
28+
"size" : "1024x1024"
29+
}
30+
],
31+
"info" : {
32+
"author" : "xcode",
33+
"version" : 1
34+
}
35+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CREATE TABLE todo (
2+
id INTEGER PRIMARY KEY AUTOINCREMENT,
3+
value TEXT NOT NULL,
4+
completedOn INTEGER,
5+
isComplete INTEGER AS Bool NOT NULL GENERATED ALWAYS AS (completedOn IS NOT NULL)
6+
);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CREATE TABLE tag (
2+
id INTEGER PRIMARY KEY AUTOINCREMENT,
3+
name TEXT NOT NULL
4+
);
5+
6+
ALTER TABLE todo ADD COLUMN tagId INTEGER DEFAULT NULL REFERENCES tag(id);
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// Mocks.swift
3+
// Example
4+
//
5+
// Created by Wes Wickwire on 6/24/25.
6+
//
7+
8+
extension Todo {
9+
static func mock(
10+
id: Int = Int.random(in: 0..<Int.max),
11+
value: String,
12+
completedOn: Int? = nil,
13+
isComplete: Bool = false,
14+
tagId: Int? = nil
15+
) -> Todo {
16+
Todo(
17+
id: id,
18+
value: value,
19+
completedOn: completedOn,
20+
isComplete: isComplete,
21+
tagId: tagId
22+
)
23+
}
24+
}
25+
26+
extension Tag {
27+
static func mock(
28+
id: Int = Int.random(in: 0..<Int.max),
29+
name: String
30+
) -> Tag {
31+
Tag(
32+
id: id,
33+
name: name
34+
)
35+
}
36+
}
37+
38+
extension TodoWithTag {
39+
static func mock(
40+
_ value: String,
41+
tag: String?
42+
) -> TodoWithTag {
43+
TodoWithTag(todo: .mock(value: value), tag: tag.map{ Tag.mock(name: $0) })
44+
}
45+
}
46+

0 commit comments

Comments
 (0)