Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 1 | /* |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 2 | * Copyright 2021 Google Inc. All rights reserved. |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 3 | * |
| 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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 17 | #if !canImport(ObjectiveC) |
| 18 | import XCTest |
| 19 | |
| 20 | extension FlatBuffersDoubleTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 21 | // 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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | extension FlatBuffersMonsterWriterTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 31 | // DO NOT MODIFY: This is autogenerated, use: |
| 32 | // `swift test --generate-linuxmain` |
| 33 | // to regenerate. |
| 34 | static let __allTests__FlatBuffersMonsterWriterTests = [ |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 35 | ("testArrayOfBools", testArrayOfBools), |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 36 | ("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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 51 | } |
| 52 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 53 | extension 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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 63 | extension FlatBuffersStructsTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 64 | // 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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | extension FlatBuffersTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 73 | // 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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | extension FlatBuffersUnionTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 90 | // 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 Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 97 | ("testStringUnion", testStringUnion), |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 98 | ("testUnionVector", testUnionVector), |
| 99 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | extension FlatBuffersVectors { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 103 | // 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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 115 | } |
| 116 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 117 | extension 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 Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 136 | public func __allTests() -> [XCTestCaseEntry] { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 137 | [ |
| 138 | testCase(FlatBuffersDoubleTests.__allTests__FlatBuffersDoubleTests), |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 139 | testCase( |
| 140 | FlatBuffersMonsterWriterTests |
| 141 | .__allTests__FlatBuffersMonsterWriterTests), |
| 142 | testCase(FlatBuffersMoreDefaults.__allTests__FlatBuffersMoreDefaults), |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 143 | testCase(FlatBuffersStructsTests.__allTests__FlatBuffersStructsTests), |
| 144 | testCase(FlatBuffersTests.__allTests__FlatBuffersTests), |
| 145 | testCase(FlatBuffersUnionTests.__allTests__FlatBuffersUnionTests), |
| 146 | testCase(FlatBuffersVectors.__allTests__FlatBuffersVectors), |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 147 | testCase(FlatbuffersVerifierTests.__allTests__FlatbuffersVerifierTests), |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame] | 148 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 149 | } |
| 150 | #endif |