mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 12:32:19 +00:00
Ported some of the python fuzz tests to C#
* Refactored the test runner to use attribute based test discovery * Ported value and vtable/object fuzzing tests from python to C#
This commit is contained in:
@@ -19,6 +19,7 @@ using MyGame.Example;
|
||||
|
||||
namespace FlatBuffers.Test
|
||||
{
|
||||
[FlatBuffersTestClass]
|
||||
public class FlatBuffersExampleTests
|
||||
{
|
||||
public void RunTests()
|
||||
@@ -28,6 +29,7 @@ namespace FlatBuffers.Test
|
||||
TestEnums();
|
||||
}
|
||||
|
||||
[FlatBuffersTestMethod]
|
||||
public void CanCreateNewFlatBufferFromScratch()
|
||||
{
|
||||
// Second, let's create a FlatBuffer from scratch in C#, and test it also.
|
||||
@@ -184,6 +186,7 @@ namespace FlatBuffers.Test
|
||||
Assert.AreEqual(false, monster.Testbool);
|
||||
}
|
||||
|
||||
[FlatBuffersTestMethod]
|
||||
public void CanReadCppGeneratedWireFile()
|
||||
{
|
||||
var data = File.ReadAllBytes(@"Resources/monsterdata_test.mon");
|
||||
@@ -191,6 +194,7 @@ namespace FlatBuffers.Test
|
||||
TestBuffer(bb);
|
||||
}
|
||||
|
||||
[FlatBuffersTestMethod]
|
||||
public void TestEnums()
|
||||
{
|
||||
Assert.AreEqual("Red", Color.Red.ToString());
|
||||
|
||||
Reference in New Issue
Block a user