This file contains hidden or 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
function layer(context, selectedLayer) { | |
let object = ''; | |
let result = {}; | |
let x = Math.floor(selectedLayer.rect.x); | |
let y = Math.floor(selectedLayer.rect.y); | |
let width = Math.floor(selectedLayer.rect.width); | |
let height = Math.floor(selectedLayer.rect.height); | |
let rect = "CGRect(x: " + x + ", y: " + y + ", width: " + width + ", height: "+ height + ")"; |
This file contains hidden or 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
// | |
// SeriesSuggestionIntent.swift | |
// | |
// This file was automatically generated and should not be edited. | |
// | |
#if canImport(Intents) | |
import Intents |
This file contains hidden or 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
@available(iOS 12.0, watchOS 5.0, *) | |
@available(macOS, unavailable) | |
@available(tvOS, unavailable) | |
@objc(SeriesSuggestionIntentHandling) | |
public protocol SeriesSuggestionIntentHandling: NSObjectProtocol {} |
This file contains hidden or 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
func testEmailIsValid() { | |
XCTAssert(inputedEmail.isValid()) | |
} |
This file contains hidden or 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
func test_EmailIsValid_GivenInputIsEmpty_ShouldReturnFalse() { | |
let inputedEmail = "" | |
XCTAssertEqual(inputedEmail.isValid(), false) | |
} |
This file contains hidden or 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
func validation(valueA: Bool?, valueB: Bool?, valueC: Bool?) { | |
guard | |
let a = valueA, | |
let b = valueB, | |
let c = valueC, | |
b,!c | |
else { | |
view.showError("error") | |
return | |
} |
This file contains hidden or 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
func test_validation_given_valueAIsNotNil_valueBIsNotNilAndTrue_valueCIsNotNilAndFalse_ShouldReturnTrue() { | |
sut.validation(valueA: false, valueB: true, valueC: false) | |
XCTAssertEqual(view.setupCalled, true) | |
XCTAssertEqual(view.setupAPassed, false) | |
XCTAssertEqual(view.setupBPassed, true) | |
XCTAssertEqual(view.setupCPassed, false) | |
} |
This file contains hidden or 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
class TableOfContentsSpec: QuickSpec { | |
override func spec() { | |
describe("the 'Documentation' directory") { | |
it("has everything you need to get started") { | |
let sections = Directory("Documentation").sections | |
expect(sections).to(contain("Organized Tests with Quick Examples and Example Groups")) | |
expect(sections).to(contain("Installing Quick")) | |
} | |
context("if it doesn't have what you're looking for") { |
This file contains hidden or 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
extension XCTContext { | |
/// Create and run a new activity with provided name and block. | |
public class func runActivity<Result>(named name: String, block: (XCTActivity) throws -> Result) rethrows -> Result | |
} |
OlderNewer