-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
92 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// AdditionalSpec.swift | ||
// Shallows | ||
// | ||
// Created by Олег on 21.02.2018. | ||
// Copyright © 2018 Shallows. All rights reserved. | ||
// | ||
|
||
import Shallows | ||
|
||
func testAdditional() { | ||
|
||
describe("renaming") { | ||
$0.it("renames read-only storage") { | ||
let r1 = ReadOnlyStorage<Int, Int>.empty() | ||
let r2 = r1.renaming(to: "r2") | ||
try expect(r2.storageName) == "r2" | ||
} | ||
$0.it("renames write-only storage") { | ||
let w1 = WriteOnlyStorage<Int, Int>.empty() | ||
let w2 = w1.renaming(to: "w2") | ||
try expect(w2.storageName) == "w2" | ||
} | ||
$0.describe("storage") { | ||
let s1 = Storage<Int, Int>.empty() | ||
let s2 = s1.renaming(to: "s2") | ||
$0.it("renames it") { | ||
try expect(s2.storageName) == "s2" | ||
} | ||
$0.it("renames asReadOnlyStorage") { | ||
try expect(s2.asReadOnlyStorage().storageName) == "s2" | ||
} | ||
$0.it("renames asWriteOnlyStorage") { | ||
try expect(s2.asWriteOnlyStorage().storageName) == "s2" | ||
} | ||
} | ||
} | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ class ShallowsXCTests : XCTestCase { | |
testResult() | ||
testZip() | ||
testComposition() | ||
testAdditional() | ||
} | ||
|
||
} | ||
|