Skip to content

Commit f72400f

Browse files
author
Hiemanshu Sharma
committed
Add kitura
1 parent 77868ec commit f72400f

File tree

6 files changed

+48
-0
lines changed

6 files changed

+48
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Framework | Requests/Sec | Average Latency
1818
[Flask + Tornado](https://github.com/tornadoweb/tornado) | 1805 | 81.79 ms
1919
[Sinatra](https://github.com/sinatra/sinatra) | 974 | 203.71 ms
2020
[Bottle](https://github.com/bottlepy/bottle) | 546 | 1.38ms
21+
[Kitura](https://github.com/IBM-Swift/Kitura) | 545 | 321.45 us
2122
[Flask](https://github.com/pallets/flask) | 544 | 74.15 ms
2223
[Falcon](https://github.com/falconry/falcon) | 543 | 47.06 ms
2324

kitura-test/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj

kitura-test/Package.swift

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import PackageDescription
2+
3+
let package = Package(
4+
name: "kitura-test",
5+
dependencies: [
6+
.Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 0, minor: 20)
7+
]
8+
)

kitura-test/Sources/main.swift

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Kitura
2+
3+
let router = Router()
4+
5+
router.get("/hello") {
6+
request, response, next in
7+
response.send("Hello, World!")
8+
next()
9+
}
10+
11+
Kitura.addHTTPServer(onPort: 8080, with: router)
12+
Kitura.run()

kitura-test/Tests/LinuxMain.swift

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import XCTest
2+
@testable import kitura-testTestSuite
3+
4+
XCTMain([
5+
testCase(kitura-testTests.allTests),
6+
])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import XCTest
2+
@testable import kitura-test
3+
4+
class kitura-testTests: XCTestCase {
5+
func testExample() {
6+
// This is an example of a functional test case.
7+
// Use XCTAssert and related functions to verify your tests produce the correct results.
8+
XCTAssertEqual(kitura-test().text, "Hello, World!")
9+
}
10+
11+
12+
static var allTests : [(String, (kitura-testTests) -> () throws -> Void)] {
13+
return [
14+
("testExample", testExample),
15+
]
16+
}
17+
}

0 commit comments

Comments
 (0)