Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xx messenger iOS
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
xx messenger iOS
Commits
488a741d
Commit
488a741d
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Use dynamic overlay for unimplemented stuff
parent
118bad43
No related branches found
No related tags found
2 merge requests
!54
Releasing 1.1.4
,
!51
CollectionView library
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sources/CollectionView/CellFactory.swift
+4
-3
4 additions, 3 deletions
Sources/CollectionView/CellFactory.swift
Sources/CollectionView/ViewConfigurator.swift
+3
-2
3 additions, 2 deletions
Sources/CollectionView/ViewConfigurator.swift
with
7 additions
and
5 deletions
Sources/CollectionView/CellFactory.swift
+
4
−
3
View file @
488a741d
import
UIKit
import
XCTestDynamicOverlay
public
struct
CellFactory
<
Model
>
{
public
struct
Registrar
{
...
...
@@ -65,10 +66,10 @@ extension CellFactory {
#if DEBUG
extension
CellFactory
{
public
static
func
failing
()
->
CellFactory
{
public
static
func
unimplemented
()
->
CellFactory
{
CellFactory
(
register
:
.
init
{
_
in
fatalError
(
"Not implemented"
)
}
,
build
:
.
init
{
_
,
_
,
_
in
fatalError
(
"Not implemented"
)
}
register
:
.
init
(
register
:
XCTUnimplemented
(
"
\(
Self
.
self
)
.Registrar"
))
,
build
:
.
init
(
build
:
XCTUnimplemented
(
"
\(
Self
.
self
)
.Builder"
))
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Sources/CollectionView/ViewConfigurator.swift
+
3
−
2
View file @
488a741d
import
UIKit
import
XCTestDynamicOverlay
public
struct
ViewConfigurator
<
View
:
UIView
,
Model
>
{
public
init
(
configure
:
@escaping
(
View
,
Model
)
->
Void
)
{
...
...
@@ -14,8 +15,8 @@ public struct ViewConfigurator<View: UIView, Model> {
#if DEBUG
extension
ViewConfigurator
{
public
static
func
failing
()
->
ViewConfigurator
{
ViewConfigurator
{
_
,
_
in
fatalError
(
"Not implemented"
)
}
public
static
func
unimplemented
()
->
ViewConfigurator
{
ViewConfigurator
(
configure
:
XCTUnimplemented
(
"
\(
Self
.
self
)
"
))
}
}
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment