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:
evolutional
2015-10-18 17:08:39 -04:00
parent 94680f5483
commit 9d66af6efc
11 changed files with 1067 additions and 40 deletions

View File

@@ -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());