Closed ngtk closed 4 years ago
https://github.com/hedjirog/SwiftShogi 週末にパフォーマンスチューニングをしたので、その知見を話します 💡
swift test
コマンドでも XCTest の measure(_:)
メソッドの結果が出力される
swift test
コマンドでreleaseのconfiguration指定をすると速度が10倍程度に変化したmeasure(_:)
メソッドの出力結果の整形に対応している
function builderの活用事例として面白いと思ったので。
https://github.com/onmyway133/Spek
Function builder BDD testing framework in Swift
import XCTest
import Spek
class TestAppTests: XCTestCase {
func testExample() {
spec {
Describe("math") {
It("should add correctly") {
XCTAssertTrue(1 + 1 == 2)
}
It("should fail") {
XCTFail()
}
}
}
}
}
ref. Quick + Nimble
import Quick
import Nimble
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") {
it("needs to be updated") {
let you = You(awesome: true)
expect{you.submittedAnIssue}.toEventually(beTruthy())
}
}
}
}
}
https://swiftwithmajid.com/2020/01/15/the-magic-of-view-preferences-in-swiftui/
Parent views share its environment with child views and subscribe to the changes. But sometimes we need to pass data up from child view to the parent view, and this is where preferences shine.
親のViewがEnvironmentを子のViewに伝えていき、その変化を購読する。一方で、子のViewが親のViewに情報を渡したいということもある。それを担うのがPreferenceである。
先日、Android shareに参加しました。 そこで紹介されていたDroidkaigiアプリのリポジトリの取り組みが素敵だなと思った。 Droidkaigiの参加者にアプリをより良くしてもらうためにContributeしてもらう作りになってた。
⚠️ This repository is public. / 公開リポジトリです。
Why
Where
Pearl Jam (Subject to change)
5F, MG Shirokanedai Building (Wantedly, Inc. Tokyo HQ)
Who
You are working for Wantedly? Sure, you can join anytime. If not, you need to contact us first. Or, you can "want to visit" the meetup, which you can find in www.wantedly.com/companies/wantedly/projects.
What
You write topics like below contents and we talk about these on the meetup. Every participant needs to write one topic at least.
Also, you can find new topics from the newsletters:
How
・・・
参加者は開催までに話したいことを少なくとも1トピックをコメントしましょう。 ネタ被りを避けるために、まずはタイトルだけでコメントすることを推奨します。 より多くの学びを得るためにどんな内容でもアウトプットを歓迎します!😊
cc/ @wantedly/ios
Edit this template
Previous issue
https://github.com/wantedly/ios_night/issues/82