Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2020 Google Inc. All rights reserved. |
| 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 = [ |
| 35 | ("testCreateMonster", testCreateMonster), |
| 36 | ("testCreateMonsterPrefixed", testCreateMonsterPrefixed), |
| 37 | ("testCreateMonsterResizedBuffer", testCreateMonsterResizedBuffer), |
| 38 | ( |
| 39 | "testCreateMonsterUsingCreateMonsterMethodWithNilPos", |
| 40 | testCreateMonsterUsingCreateMonsterMethodWithNilPos), |
| 41 | ( |
| 42 | "testCreateMonsterUsingCreateMonsterMethodWithPosX", |
| 43 | testCreateMonsterUsingCreateMonsterMethodWithPosX), |
| 44 | ("testData", testData), |
| 45 | ("testReadFromOtherLanguages", testReadFromOtherLanguages), |
| 46 | ( |
| 47 | "testReadMonsterFromUnsafePointerWithoutCopying", |
| 48 | testReadMonsterFromUnsafePointerWithoutCopying), |
| 49 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | extension FlatBuffersStructsTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame^] | 53 | // DO NOT MODIFY: This is autogenerated, use: |
| 54 | // `swift test --generate-linuxmain` |
| 55 | // to regenerate. |
| 56 | static let __allTests__FlatBuffersStructsTests = [ |
| 57 | ("testWritingAndMutatingBools", testWritingAndMutatingBools), |
| 58 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | extension FlatBuffersTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame^] | 62 | // DO NOT MODIFY: This is autogenerated, use: |
| 63 | // `swift test --generate-linuxmain` |
| 64 | // to regenerate. |
| 65 | static let __allTests__FlatBuffersTests = [ |
| 66 | ("testCreateFinish", testCreateFinish), |
| 67 | ("testCreateFinishWithPrefix", testCreateFinishWithPrefix), |
| 68 | ("testCreateString", testCreateString), |
| 69 | ("testEndian", testEndian), |
| 70 | ("testOffset", testOffset), |
| 71 | ("testReadCountry", testReadCountry), |
| 72 | ("testStartTable", testStartTable), |
| 73 | ("testWriteNullableStrings", testWriteNullableStrings), |
| 74 | ("testWriteOptionalValues", testWriteOptionalValues), |
| 75 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | extension FlatBuffersUnionTests { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame^] | 79 | // DO NOT MODIFY: This is autogenerated, use: |
| 80 | // `swift test --generate-linuxmain` |
| 81 | // to regenerate. |
| 82 | static let __allTests__FlatBuffersUnionTests = [ |
| 83 | ("testCreateMonstor", testCreateMonstor), |
| 84 | ("testEndTableFinish", testEndTableFinish), |
| 85 | ("testEnumVector", testEnumVector), |
| 86 | ("testUnionVector", testUnionVector), |
| 87 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | extension FlatBuffersVectors { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame^] | 91 | // DO NOT MODIFY: This is autogenerated, use: |
| 92 | // `swift test --generate-linuxmain` |
| 93 | // to regenerate. |
| 94 | static let __allTests__FlatBuffersVectors = [ |
| 95 | ("testCreateEmptyIntArray", testCreateEmptyIntArray), |
| 96 | ("testCreateIntArray", testCreateIntArray), |
| 97 | ("testCreateSharedStringVector", testCreateSharedStringVector), |
| 98 | ("testCreateVectorOfStrings", testCreateVectorOfStrings), |
| 99 | ("testCreatingTwoCountries", testCreatingTwoCountries), |
| 100 | ("testReadDoubleArray", testReadDoubleArray), |
| 101 | ("testReadInt32Array", testReadInt32Array), |
| 102 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | public func __allTests() -> [XCTestCaseEntry] { |
Austin Schuh | 58b9b47 | 2020-11-25 19:12:44 -0800 | [diff] [blame^] | 106 | [ |
| 107 | testCase(FlatBuffersDoubleTests.__allTests__FlatBuffersDoubleTests), |
| 108 | testCase(FlatBuffersMonsterWriterTests.__allTests__FlatBuffersMonsterWriterTests), |
| 109 | testCase(FlatBuffersStructsTests.__allTests__FlatBuffersStructsTests), |
| 110 | testCase(FlatBuffersTests.__allTests__FlatBuffersTests), |
| 111 | testCase(FlatBuffersUnionTests.__allTests__FlatBuffersUnionTests), |
| 112 | testCase(FlatBuffersVectors.__allTests__FlatBuffersVectors), |
| 113 | ] |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 114 | } |
| 115 | #endif |