blob: 41347628cc102cf68ee2a41003612e4a7f6df33e [file] [log] [blame]
Austin Schuh58b9b472020-11-25 19:12:44 -08001/*
James Kuszmaul8e62b022022-03-22 09:33:25 -07002 * Copyright 2021 Google Inc. All rights reserved.
Austin Schuh58b9b472020-11-25 19:12:44 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Austin Schuh272c6132020-11-14 16:37:52 -080017#if !canImport(ObjectiveC)
18import XCTest
19
20extension FlatBuffersDoubleTests {
Austin Schuh58b9b472020-11-25 19:12:44 -080021 // DO NOT MODIFY: This is autogenerated, use:
22 // `swift test --generate-linuxmain`
23 // to regenerate.
24 static let __allTests__FlatBuffersDoubleTests = [
25 ("testCreateFinish", testCreateFinish),
26 ("testCreateFinishWithPrefix", testCreateFinishWithPrefix),
27 ]
Austin Schuh272c6132020-11-14 16:37:52 -080028}
29
30extension FlatBuffersMonsterWriterTests {
Austin Schuh58b9b472020-11-25 19:12:44 -080031 // DO NOT MODIFY: This is autogenerated, use:
32 // `swift test --generate-linuxmain`
33 // to regenerate.
34 static let __allTests__FlatBuffersMonsterWriterTests = [
James Kuszmaul8e62b022022-03-22 09:33:25 -070035 ("testArrayOfBools", testArrayOfBools),
Austin Schuh58b9b472020-11-25 19:12:44 -080036 ("testCreateMonster", testCreateMonster),
37 ("testCreateMonsterPrefixed", testCreateMonsterPrefixed),
38 ("testCreateMonsterResizedBuffer", testCreateMonsterResizedBuffer),
39 (
40 "testCreateMonsterUsingCreateMonsterMethodWithNilPos",
41 testCreateMonsterUsingCreateMonsterMethodWithNilPos),
42 (
43 "testCreateMonsterUsingCreateMonsterMethodWithPosX",
44 testCreateMonsterUsingCreateMonsterMethodWithPosX),
45 ("testData", testData),
46 ("testReadFromOtherLanguages", testReadFromOtherLanguages),
47 (
48 "testReadMonsterFromUnsafePointerWithoutCopying",
49 testReadMonsterFromUnsafePointerWithoutCopying),
50 ]
Austin Schuh272c6132020-11-14 16:37:52 -080051}
52
James Kuszmaul8e62b022022-03-22 09:33:25 -070053extension FlatBuffersMoreDefaults {
54 // DO NOT MODIFY: This is autogenerated, use:
55 // `swift test --generate-linuxmain`
56 // to regenerate.
57 static let __allTests__FlatBuffersMoreDefaults = [
58 ("testFlatbuffersObject", testFlatbuffersObject),
59 ("testFlatbuffersObjectAPI", testFlatbuffersObjectAPI),
60 ]
61}
62
Austin Schuh272c6132020-11-14 16:37:52 -080063extension FlatBuffersStructsTests {
Austin Schuh58b9b472020-11-25 19:12:44 -080064 // DO NOT MODIFY: This is autogenerated, use:
65 // `swift test --generate-linuxmain`
66 // to regenerate.
67 static let __allTests__FlatBuffersStructsTests = [
68 ("testWritingAndMutatingBools", testWritingAndMutatingBools),
69 ]
Austin Schuh272c6132020-11-14 16:37:52 -080070}
71
72extension FlatBuffersTests {
Austin Schuh58b9b472020-11-25 19:12:44 -080073 // DO NOT MODIFY: This is autogenerated, use:
74 // `swift test --generate-linuxmain`
75 // to regenerate.
76 static let __allTests__FlatBuffersTests = [
77 ("testCreateFinish", testCreateFinish),
78 ("testCreateFinishWithPrefix", testCreateFinishWithPrefix),
79 ("testCreateString", testCreateString),
80 ("testEndian", testEndian),
81 ("testOffset", testOffset),
82 ("testReadCountry", testReadCountry),
83 ("testStartTable", testStartTable),
84 ("testWriteNullableStrings", testWriteNullableStrings),
85 ("testWriteOptionalValues", testWriteOptionalValues),
86 ]
Austin Schuh272c6132020-11-14 16:37:52 -080087}
88
89extension FlatBuffersUnionTests {
Austin Schuh58b9b472020-11-25 19:12:44 -080090 // DO NOT MODIFY: This is autogenerated, use:
91 // `swift test --generate-linuxmain`
92 // to regenerate.
93 static let __allTests__FlatBuffersUnionTests = [
94 ("testCreateMonstor", testCreateMonstor),
95 ("testEndTableFinish", testEndTableFinish),
96 ("testEnumVector", testEnumVector),
James Kuszmaul8e62b022022-03-22 09:33:25 -070097 ("testStringUnion", testStringUnion),
Austin Schuh58b9b472020-11-25 19:12:44 -080098 ("testUnionVector", testUnionVector),
99 ]
Austin Schuh272c6132020-11-14 16:37:52 -0800100}
101
102extension FlatBuffersVectors {
Austin Schuh58b9b472020-11-25 19:12:44 -0800103 // DO NOT MODIFY: This is autogenerated, use:
104 // `swift test --generate-linuxmain`
105 // to regenerate.
106 static let __allTests__FlatBuffersVectors = [
107 ("testCreateEmptyIntArray", testCreateEmptyIntArray),
108 ("testCreateIntArray", testCreateIntArray),
109 ("testCreateSharedStringVector", testCreateSharedStringVector),
110 ("testCreateVectorOfStrings", testCreateVectorOfStrings),
111 ("testCreatingTwoCountries", testCreatingTwoCountries),
112 ("testReadDoubleArray", testReadDoubleArray),
113 ("testReadInt32Array", testReadInt32Array),
114 ]
Austin Schuh272c6132020-11-14 16:37:52 -0800115}
116
James Kuszmaul8e62b022022-03-22 09:33:25 -0700117extension FlatbuffersVerifierTests {
118 // DO NOT MODIFY: This is autogenerated, use:
119 // `swift test --generate-linuxmain`
120 // to regenerate.
121 static let __allTests__FlatbuffersVerifierTests = [
122 ("testFullVerifier", testFullVerifier),
123 ("testInvalidBuffer", testInvalidBuffer),
124 ("testPositionInBuffer", testPositionInBuffer),
125 ("testRangeInBuffer", testRangeInBuffer),
126 ("testTableVerifier", testTableVerifier),
127 ("testValidUnionBuffer", testValidUnionBuffer),
128 ("testVeriferInitFailing", testVeriferInitFailing),
129 ("testVeriferInitPassing", testVeriferInitPassing),
130 ("testVerifierCheckAlignment", testVerifierCheckAlignment),
131 ("testVerifyUnionVectors", testVerifyUnionVectors),
132 ("testVisitTable", testVisitTable),
133 ]
134}
135
Austin Schuh272c6132020-11-14 16:37:52 -0800136public func __allTests() -> [XCTestCaseEntry] {
Austin Schuh58b9b472020-11-25 19:12:44 -0800137 [
138 testCase(FlatBuffersDoubleTests.__allTests__FlatBuffersDoubleTests),
James Kuszmaul8e62b022022-03-22 09:33:25 -0700139 testCase(
140 FlatBuffersMonsterWriterTests
141 .__allTests__FlatBuffersMonsterWriterTests),
142 testCase(FlatBuffersMoreDefaults.__allTests__FlatBuffersMoreDefaults),
Austin Schuh58b9b472020-11-25 19:12:44 -0800143 testCase(FlatBuffersStructsTests.__allTests__FlatBuffersStructsTests),
144 testCase(FlatBuffersTests.__allTests__FlatBuffersTests),
145 testCase(FlatBuffersUnionTests.__allTests__FlatBuffersUnionTests),
146 testCase(FlatBuffersVectors.__allTests__FlatBuffersVectors),
James Kuszmaul8e62b022022-03-22 09:33:25 -0700147 testCase(FlatbuffersVerifierTests.__allTests__FlatbuffersVerifierTests),
Austin Schuh58b9b472020-11-25 19:12:44 -0800148 ]
Austin Schuh272c6132020-11-14 16:37:52 -0800149}
150#endif