Implements verifier and code gen for swift (#6373)

Updates test cases on linux

Adhere to new protocol naming

Adds fuzzing

Adds documentation

Adds support for string unions

Updated fuzzer generated code
This commit is contained in:
mustiikhalil
2021-05-14 20:59:28 +03:00
committed by GitHub
parent 04b10f5a3a
commit a5175c513a
38 changed files with 2291 additions and 168 deletions

View File

@@ -36,11 +36,17 @@ extension FlatBuffersMonsterWriterTests {
("testCreateMonster", testCreateMonster),
("testCreateMonsterPrefixed", testCreateMonsterPrefixed),
("testCreateMonsterResizedBuffer", testCreateMonsterResizedBuffer),
("testCreateMonsterUsingCreateMonsterMethodWithNilPos", testCreateMonsterUsingCreateMonsterMethodWithNilPos),
("testCreateMonsterUsingCreateMonsterMethodWithPosX", testCreateMonsterUsingCreateMonsterMethodWithPosX),
(
"testCreateMonsterUsingCreateMonsterMethodWithNilPos",
testCreateMonsterUsingCreateMonsterMethodWithNilPos),
(
"testCreateMonsterUsingCreateMonsterMethodWithPosX",
testCreateMonsterUsingCreateMonsterMethodWithPosX),
("testData", testData),
("testReadFromOtherLanguages", testReadFromOtherLanguages),
("testReadMonsterFromUnsafePointerWithoutCopying", testReadMonsterFromUnsafePointerWithoutCopying),
(
"testReadMonsterFromUnsafePointerWithoutCopying",
testReadMonsterFromUnsafePointerWithoutCopying),
]
}
@@ -108,6 +114,25 @@ extension FlatBuffersVectors {
]
}
extension FlatbuffersVerifierTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__FlatbuffersVerifierTests = [
("testFullVerifier", testFullVerifier),
("testInvalidBuffer", testInvalidBuffer),
("testPositionInBuffer", testPositionInBuffer),
("testRangeInBuffer", testRangeInBuffer),
("testTableVerifier", testTableVerifier),
("testValidUnionBuffer", testValidUnionBuffer),
("testVeriferInitFailing", testVeriferInitFailing),
("testVeriferInitPassing", testVeriferInitPassing),
("testVerifierCheckAlignment", testVerifierCheckAlignment),
("testVerifyUnionVectors", testVerifyUnionVectors),
("testVisitTable", testVisitTable),
]
}
public func __allTests() -> [XCTestCaseEntry] {
[
testCase(FlatBuffersDoubleTests.__allTests__FlatBuffersDoubleTests),
@@ -117,6 +142,7 @@ public func __allTests() -> [XCTestCaseEntry] {
testCase(FlatBuffersTests.__allTests__FlatBuffersTests),
testCase(FlatBuffersUnionTests.__allTests__FlatBuffersUnionTests),
testCase(FlatBuffersVectors.__allTests__FlatBuffersVectors),
testCase(FlatbuffersVerifierTests.__allTests__FlatbuffersVerifierTests),
]
}
#endif