Skip to content

Commit 3e08683

Browse files
authored
Merge pull request #49 from fumiyasac/feature/update-2026
2026年分のテストケースを新規追加 & 調整対応
2 parents a34aa45 + 782b2b7 commit 3e08683

File tree

6 files changed

+140
-25
lines changed

6 files changed

+140
-25
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on: [push, pull_request]
44

55
env:
6-
DEVELOPER_DIR: /Applications/Xcode_15.3.app
6+
DEVELOPER_DIR: /Applications/Xcode_16.2.app
77

88
jobs:
99
build:

Tests/CalculateCalendarLogicTests/CalculateCalendarLogicTests.swift

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,13 +554,13 @@ class CalculateCalendarLogicTests: XCTestCase {
554554
// 建国記念の日: 2025年2月11日(火曜日)
555555
(2025, 2, 11, true),
556556

557-
// 天皇誕生日: 2024年2月23日(日曜日)
557+
// 天皇誕生日: 2025年2月23日(日曜日)
558558
(2025, 2, 23, true),
559559

560-
// 振替休日: 2024年2月24日(月曜日)
560+
// 振替休日: 2025年2月24日(月曜日)
561561
(2025, 2, 24, true),
562562

563-
// 春分の日: 2024年3月20日(木曜日)
563+
// 春分の日: 2025年3月20日(木曜日)
564564
(2025, 3, 20, true),
565565

566566
// 昭和の日: 2025年4月29日(火曜日)
@@ -602,6 +602,60 @@ class CalculateCalendarLogicTests: XCTestCase {
602602
// 振替休日: 2025年11月24日(月曜日)
603603
(2025, 11, 24, true),
604604

605+
// 2026年
606+
// 元日: 2026年1月1日(木曜日)
607+
(2026, 1, 1, true),
608+
609+
// 成人の日: 2026年1月12日(月曜日)
610+
(2026, 1, 12, true),
611+
612+
// 建国記念の日: 2026年2月11日(水曜日)
613+
(2026, 2, 11, true),
614+
615+
// 天皇誕生日: 2026年2月23日(月曜日)
616+
(2026, 2, 23, true),
617+
618+
// 春分の日: 2026年3月20日(金曜日)
619+
(2026, 3, 20, true),
620+
621+
// 昭和の日: 2026年4月29日(水曜日)
622+
(2026, 4, 29, true),
623+
624+
// 憲法記念日: 2026年5月3日(日曜日)
625+
(2026, 5, 3, true),
626+
627+
// みどりの日: 2026年5月4日(月曜日)
628+
(2026, 5, 4, true),
629+
630+
// こどもの日: 2026年5月5日(火曜日)
631+
(2026, 5, 5, true),
632+
633+
// 振替休日: 2026年5月6日(水曜日)
634+
(2026, 5, 6, true),
635+
636+
// 海の日: 2026年7月20日(月曜日)
637+
(2026, 7, 20, true),
638+
639+
// 山の日: 2026年8月11日(火曜日)
640+
(2026, 8, 11, true),
641+
642+
// 敬老の日: 2026年9月21日(月曜日)
643+
(2026, 9, 21, true),
644+
645+
// 振替休日: 2026年9月22日(火曜日)
646+
(2026, 9, 22, true),
647+
648+
// 秋分の日: 2026年9月23日(水曜日)
649+
(2026, 9, 23, true),
650+
651+
// スポーツの日: 2026年10月12日(月曜日)
652+
(2026, 10, 12, true),
653+
654+
// 文化の日: 2026年11月3日(火曜日)
655+
(2026, 11, 3, true),
656+
657+
// 勤労感謝の日: 2026年11月23日(月曜日)
658+
(2026, 11, 23, true),
605659
]
606660
testCases.forEach { (arg) in
607661

handMadeCalendarAdvance.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
DE7397041CCB4EC100A9A222 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DE7397021CCB4EC100A9A222 /* LaunchScreen.storyboard */; };
2222
DE73970F1CCB4EC100A9A222 /* handMadeCalendarAdvanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE73970E1CCB4EC100A9A222 /* handMadeCalendarAdvanceTests.swift */; };
2323
DE73971A1CCB4EC100A9A222 /* handMadeCalendarAdvanceUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE7397191CCB4EC100A9A222 /* handMadeCalendarAdvanceUITests.swift */; };
24+
DE7609502F05DFBF005D8CC2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE76094F2F05DFBF005D8CC2 /* SceneDelegate.swift */; };
2425
DEE369B4257C8A1600A22800 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEE369B3257C8A1600A22800 /* MainViewController.swift */; };
2526
DEE369C3257C8E5A00A22800 /* DatePickerCalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEE369C2257C8E5A00A22800 /* DatePickerCalendarViewController.swift */; };
2627
DEE369D1257CCD3400A22800 /* DisplayDateTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEE369D0257CCD3400A22800 /* DisplayDateTextField.swift */; };
@@ -110,6 +111,7 @@
110111
DE7397151CCB4EC100A9A222 /* handMadeCalendarAdvanceUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = handMadeCalendarAdvanceUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
111112
DE7397191CCB4EC100A9A222 /* handMadeCalendarAdvanceUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = handMadeCalendarAdvanceUITests.swift; sourceTree = "<group>"; };
112113
DE73971B1CCB4EC100A9A222 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
114+
DE76094F2F05DFBF005D8CC2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
113115
DEE369B3257C8A1600A22800 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
114116
DEE369C2257C8E5A00A22800 /* DatePickerCalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerCalendarViewController.swift; sourceTree = "<group>"; };
115117
DEE369D0257CCD3400A22800 /* DisplayDateTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayDateTextField.swift; sourceTree = "<group>"; };
@@ -220,6 +222,7 @@
220222
DE0166BA1CDE40DC002BB133 /* Component */,
221223
DEE369BB257C8B5600A22800 /* ViewController */,
222224
DE7396F91CCB4EC100A9A222 /* AppDelegate.swift */,
225+
DE76094F2F05DFBF005D8CC2 /* SceneDelegate.swift */,
223226
DE7396FD1CCB4EC100A9A222 /* Main.storyboard */,
224227
DE7397001CCB4EC100A9A222 /* Assets.xcassets */,
225228
DE7397021CCB4EC100A9A222 /* LaunchScreen.storyboard */,
@@ -618,6 +621,7 @@
618621
files = (
619622
DEE369D1257CCD3400A22800 /* DisplayDateTextField.swift in Sources */,
620623
DEE369C3257C8E5A00A22800 /* DatePickerCalendarViewController.swift in Sources */,
624+
DE7609502F05DFBF005D8CC2 /* SceneDelegate.swift in Sources */,
621625
DE03CFF329608C650054BCF1 /* NewCalendarViewController.swift in Sources */,
622626
DE7396FC1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift in Sources */,
623627
DE4977542D26609200FEC950 /* DatePickerSelectView.swift in Sources */,

handMadeCalendarAdvance/AppDelegate.swift

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,24 @@ import UIKit
1111
@UIApplicationMain
1212
class AppDelegate: UIResponder, UIApplicationDelegate {
1313

14-
var window: UIWindow?
15-
16-
1714
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1815
// Override point for customization after application launch.
1916
return true
2017
}
2118

22-
func applicationWillResignActive(_ application: UIApplication) {
23-
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24-
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25-
}
26-
27-
func applicationDidEnterBackground(_ application: UIApplication) {
28-
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29-
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30-
}
31-
32-
func applicationWillEnterForeground(_ application: UIApplication) {
33-
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34-
}
19+
// MARK: UISceneSession Lifecycle
3520

36-
func applicationDidBecomeActive(_ application: UIApplication) {
37-
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
21+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
22+
// Called when a new scene session is being created.
23+
// Use this method to select a configuration to create the new scene with.
24+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
3825
}
3926

40-
func applicationWillTerminate(_ application: UIApplication) {
41-
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
27+
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
28+
// Called when the user discards a scene session.
29+
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
30+
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
4231
}
4332

44-
4533
}
4634

handMadeCalendarAdvance/Info.plist

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,24 @@
3434
<array>
3535
<string>UIInterfaceOrientationPortrait</string>
3636
</array>
37+
<key>UIApplicationSceneManifest</key>
38+
<dict>
39+
<key>UIApplicationSupportsMultipleScenes</key>
40+
<false/>
41+
<key>UISceneConfigurations</key>
42+
<dict>
43+
<key>UIWindowSceneSessionRoleApplication</key>
44+
<array>
45+
<dict>
46+
<key>UISceneConfigurationName</key>
47+
<string>Default Configuration</string>
48+
<key>UISceneDelegateClassName</key>
49+
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
50+
<key>UISceneStoryboardFile</key>
51+
<string>Main</string>
52+
</dict>
53+
</array>
54+
</dict>
55+
</dict>
3756
</dict>
3857
</plist>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//
2+
// SceneDelegate.swift
3+
// handMadeCalendarAdvance
4+
//
5+
// Created by 酒井文也 on 2026/01/01.
6+
// Copyright © 2026年 just1factory. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
12+
13+
var window: UIWindow?
14+
15+
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
16+
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
17+
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
18+
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
19+
guard let _ = (scene as? UIWindowScene) else { return }
20+
}
21+
22+
func sceneDidDisconnect(_ scene: UIScene) {
23+
// Called as the scene is being released by the system.
24+
// This occurs shortly after the scene enters the background, or when its session is discarded.
25+
// Release any resources associated with this scene that can be re-created the next time the scene connects.
26+
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
27+
}
28+
29+
func sceneDidBecomeActive(_ scene: UIScene) {
30+
// Called when the scene has moved from an inactive state to an active state.
31+
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
32+
}
33+
34+
func sceneWillResignActive(_ scene: UIScene) {
35+
// Called when the scene will move from an active state to an inactive state.
36+
// This may occur due to temporary interruptions (ex. an incoming phone call).
37+
}
38+
39+
func sceneWillEnterForeground(_ scene: UIScene) {
40+
// Called as the scene transitions from the background to the foreground.
41+
// Use this method to undo the changes made on entering the background.
42+
}
43+
44+
func sceneDidEnterBackground(_ scene: UIScene) {
45+
// Called as the scene transitions from the foreground to the background.
46+
// Use this method to save data, release shared resources, and store enough scene-specific state information
47+
// to restore the scene back to its current state.
48+
}
49+
50+
}

0 commit comments

Comments
 (0)