Skip to content

Commit 039777b

Browse files
0 parents  commit 039777b

File tree

12 files changed

+679
-0
lines changed

12 files changed

+679
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/

Package.resolved

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "JavaScriptKit",
6+
"repositoryURL": "https://github.com/swiftwasm/JavaScriptKit.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "b19e7c8b10a2750ed47753e31ed13613171f3294",
10+
"version": "0.10.1"
11+
}
12+
},
13+
{
14+
"package": "OpenCombine",
15+
"repositoryURL": "https://github.com/OpenCombine/OpenCombine.git",
16+
"state": {
17+
"branch": null,
18+
"revision": "28993ae57de5a4ea7e164787636cafad442d568c",
19+
"version": "0.12.0"
20+
}
21+
},
22+
{
23+
"package": "OpenCombineJS",
24+
"repositoryURL": "https://github.com/swiftwasm/OpenCombineJS.git",
25+
"state": {
26+
"branch": null,
27+
"revision": "eaf324ce78710f53b52fb82e9a8de4693633e33a",
28+
"version": "0.1.1"
29+
}
30+
},
31+
{
32+
"package": "swift-argument-parser",
33+
"repositoryURL": "https://github.com/apple/swift-argument-parser",
34+
"state": {
35+
"branch": null,
36+
"revision": "83b23d940471b313427da226196661856f6ba3e0",
37+
"version": "0.4.4"
38+
}
39+
},
40+
{
41+
"package": "Benchmark",
42+
"repositoryURL": "https://github.com/google/swift-benchmark",
43+
"state": {
44+
"branch": null,
45+
"revision": "8e0ef8bb7482ab97dcd2cd1d6855bd38921c345d",
46+
"version": "0.1.0"
47+
}
48+
},
49+
{
50+
"package": "Tokamak",
51+
"repositoryURL": "https://github.com/TokamakUI/Tokamak/",
52+
"state": {
53+
"branch": null,
54+
"revision": "57f57174c5b314cea80c0986a16b3e57942c0c00",
55+
"version": "0.7.0"
56+
}
57+
}
58+
]
59+
},
60+
"version": 1
61+
}

Package.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// swift-tools-version:5.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "swiftwasm-issue-2851",
8+
products: [
9+
// Products define the executables and libraries a package produces, and make them visible to other packages.
10+
.library(
11+
name: "swiftwasm-issue-2851",
12+
targets: ["swiftwasm-issue-2851"]),
13+
],
14+
dependencies: [
15+
// Dependencies declare other packages that this package depends on.
16+
.package(url: "https://github.com/TokamakUI/Tokamak/", from: "0.7.0"),
17+
],
18+
targets: [
19+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
21+
.target(
22+
name: "swiftwasm-issue-2851",
23+
dependencies: [
24+
.product(name: "TokamakDOM", package: "Tokamak"),
25+
]),
26+
.testTarget(
27+
name: "swiftwasm-issue-2851Tests",
28+
dependencies: ["swiftwasm-issue-2851"]),
29+
]
30+
)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# swiftwasm-issue-2851
2+
3+
A description of this package.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
struct swiftwasm_issue_2851 {
2+
var text = "Hello, World!"
3+
}

Tests/LinuxMain.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import XCTest
2+
3+
import swiftwasm_issue_2851Tests
4+
5+
var tests = [XCTestCaseEntry]()
6+
tests += swiftwasm_issue_2851Tests.allTests()
7+
XCTMain(tests)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import XCTest
2+
3+
#if !canImport(ObjectiveC)
4+
public func allTests() -> [XCTestCaseEntry] {
5+
return [
6+
testCase(swiftwasm_issue_2851Tests.allTests),
7+
]
8+
}
9+
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import XCTest
2+
@testable import swiftwasm_issue_2851
3+
4+
final class swiftwasm_issue_2851Tests: 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
8+
// results.
9+
XCTAssertEqual(swiftwasm_issue_2851().text, "Hello, World!")
10+
}
11+
12+
static var allTests = [
13+
("testExample", testExample),
14+
]
15+
}

bug.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TOOLCHAIN=/Library/Developer/Toolchains/swift-wasm-DEVELOPMENT-SNAPSHOT-2021-03-10-a.xctoolchain
2+
$TOOLCHAIN/usr/bin/swift-frontend -frontend -c -filelist ./filelist -supplementary-output-file-map supplementaryOutputs -target wasm32-unknown-wasi -disable-objc-interop -sdk $TOOLCHAIN/usr/share/wasi-sysroot -I .build/wasm32-unknown-wasi/release -color-diagnostics -g -module-cache-path .build/wasm32-unknown-wasi/release/ModuleCache -swift-version 5 -O -D SWIFT_PACKAGE -parse-as-library -module-name TokamakCore -num-threads 8 -output-filelist outputs -use-static-resource-dir

0 commit comments

Comments
 (0)