Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
Caroline
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Drew
Caroline
Commits
1d9ee8bf
Commit
1d9ee8bf
authored
May 22, 2016
by
Drew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a
parent
e3a7a9f4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
7 deletions
+36
-7
CarolineCore/Functions.swift
CarolineCore/Functions.swift
+1
-1
Info.plist
Info.plist
+28
-0
build.atpkg
build.atpkg
+1
-0
caroline-static-tool/FileUtils.swift
caroline-static-tool/FileUtils.swift
+2
-2
caroline-static-tool/StandBack.swift
caroline-static-tool/StandBack.swift
+2
-2
caroline-static-tool/Xcodeproj.swift
caroline-static-tool/Xcodeproj.swift
+2
-2
No files found.
CarolineCore/Functions.swift
View file @
1d9ee8bf
...
...
@@ -27,7 +27,7 @@ POSSIBILITY OF SUCH DAMAGE.*/
//MARK: Functions
extension
CarolineTest
{
public
final
func
assert
(
@autoclosure
_
condition
:
()
->
Bool
,
@autoclosure
_
message
:
()
->
String
=
"Test failed"
,
file
:
String
=
#file
,
line
:
Int
=
#line
)
{
public
final
func
assert
(
_
condition
:
@autoclosure
()
->
Bool
,
_
message
:
@autoclosure
()
->
String
=
"Test failed"
,
file
:
String
=
#file
,
line
:
Int
=
#line
)
{
if
!
condition
()
{
var
state
=
CarolineState
(
test
:
self
)
state
.
outcome
=
.
Failed
...
...
Info.plist
0 → 100644
View file @
1d9ee8bf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
CFBundleDevelopmentRegion
</key>
<string>
en
</string>
<key>
CFBundleExecutable
</key>
<string>
CarolineCore
</string>
<key>
CFBundleIdentifier
</key>
<string>
com.sealedabstract.CarolineCore
</string>
<key>
CFBundleInfoDictionaryVersion
</key>
<string>
6.0
</string>
<key>
CFBundleName
</key>
<string>
CarolineCore
</string>
<key>
CFBundlePackageType
</key>
<string>
FMWK
</string>
<key>
CFBundleShortVersionString
</key>
<string>
0.1
</string>
<key>
CFBundleSignature
</key>
<string>
????
</string>
<key>
CFBundleVersion
</key>
<string>
0.1
</string>
<key>
NSHumanReadableCopyright
</key>
<string>
Copyright © 2016 Drew Crawford. All rights reserved.
</string>
<key>
NSPrincipalClass
</key>
<string></string>
</dict>
</plist>
build.atpkg
View file @
1d9ee8bf
...
...
@@ -7,6 +7,7 @@
:name "caroline_static_tool"
:sources ["caroline-static-tool/**.swift"]
:publish-product true
:link-options ["-static-stdlib"]
}
:debug {
:dependencies ["statictool"]
...
...
caroline-static-tool/FileUtils.swift
View file @
1d9ee8bf
...
...
@@ -105,11 +105,11 @@ extension String {
///The location of the directory for the item.
var
directoryPath
:
String
{
var
position
=
self
.
characters
.
endIndex
for
(
x
,
c
)
in
self
.
characters
.
reversed
()
.
enumerat
ed
()
{
for
c
in
self
.
characters
.
revers
ed
()
{
if
c
==
"/"
{
return
String
(
self
.
characters
[
self
.
characters
.
startIndex
..<
position
])
}
position
=
position
.
predecessor
(
)
position
=
self
.
characters
.
index
(
before
:
position
)
}
return
self
}
...
...
caroline-static-tool/StandBack.swift
View file @
1d9ee8bf
...
...
@@ -192,7 +192,7 @@ struct Match : CustomStringConvertible, CustomDebugStringConvertible {
///The part of the string that matched this expression
var
region
:
String
{
let
utf8
=
self
.
underlyingString
.
utf8
return
String
(
utf8
[
utf8
.
startIndex
.
advanced
(
by
:
start
)
..<
utf8
.
startIndex
.
advanced
(
by
:
end
)])
return
String
(
utf8
[
utf8
.
index
(
utf8
.
startIndex
,
offsetBy
:
start
)
..<
utf8
.
index
(
utf8
.
startIndex
,
offsetBy
:
end
)])
}
private
init
?(
start
:
Int
,
end
:
Int
,
underlyingString
:
String
)
{
if
start
==
-
1
&&
end
==
-
1
{
return
nil
}
...
...
@@ -234,7 +234,7 @@ class FindResultGenerator: IteratorProtocol {
internal
func
next
()
->
FindResultGenerator
.
Element
?
{
let
startPosition
=
lastStart
+
(
lastMatch
?
.
end
??
0
)
+
1
lastStart
=
startPosition
let
proposedStartIndex
=
string
.
utf8
.
startIndex
.
advanced
(
by
:
startPosition
,
limit
:
string
.
utf8
.
endIndex
)
let
proposedStartIndex
=
string
.
utf8
.
index
(
string
.
utf8
.
startIndex
,
offsetBy
:
startPosition
,
limitedBy
:
string
.
utf8
.
endIndex
)
!
let
abbreviatedString
=
String
(
string
.
utf8
[
proposedStartIndex
..<
string
.
utf8
.
endIndex
])
!
let
result
=
try!
regex
.
findFirst
(
inString
:
abbreviatedString
)
lastMatch
=
result
?
.
entireMatch
...
...
caroline-static-tool/Xcodeproj.swift
View file @
1d9ee8bf
...
...
@@ -35,7 +35,7 @@ import Darwin
func
env_
(
_
variable
:
String
)
->
String
?
{
let
env
=
getenv
(
variable
)
if
env
==
nil
{
return
nil
}
return
String
(
validatingUTF8
:
env
)
return
String
(
validatingUTF8
:
env
!
)
}
///Performs XCTest integration
...
...
@@ -121,7 +121,7 @@ func parseXcodeProj(_ fileName: String, targetName: String) -> [String] {
guard
var
path
=
try!
pathRegex
.
findFirst
(
inString
:
file
)?
.
groups
[
0
]?
.
description
else
{
fatalError
(
"Can't find path for file
\(
fileRef
)
"
)
}
if
path
.
hasSuffix
(
"
\"
"
)
{
path
.
remove
(
at
:
path
.
characters
.
endIndex
.
predecessor
(
))}
if
path
.
hasSuffix
(
"
\"
"
)
{
path
.
remove
(
at
:
path
.
characters
.
index
(
before
:
path
.
characters
.
endIndex
))}
//this is cheating; the targetName may not be the same as the group, but fuck it
paths
.
append
(
"
\(
pathToXcodeProject
)
/
\(
targetName
)
/
\(
path
)
"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment