Made sure all namespace test files get generated.

Also included them in the C++ test.

Change-Id: Ib0c8470f0aacdf16616c27494abdda57a010195d
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2015-12-09 17:06:11 -08:00
parent 4dcaec7938
commit a9909a0c18
16 changed files with 426 additions and 18 deletions

View File

@@ -0,0 +1,9 @@
# automatically generated, do not modify
# namespace: NamespaceB
class EnumInNestedNS(object):
A = 0
B = 1
C = 2

View File

@@ -3,6 +3,7 @@
namespace NamespaceA.NamespaceB
{
using System;
using FlatBuffers;
public sealed class StructInNestedNS : Struct {

View File

@@ -0,0 +1,23 @@
# automatically generated, do not modify
# namespace: NamespaceB
import flatbuffers
class StructInNestedNS(object):
__slots__ = ['_tab']
# StructInNestedNS
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# StructInNestedNS
def A(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
# StructInNestedNS
def B(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4))
def CreateStructInNestedNS(builder, a, b):
builder.Prep(4, 8)
builder.PrependInt32(b)
builder.PrependInt32(a)
return builder.Offset()

View File

@@ -3,6 +3,7 @@
namespace NamespaceA.NamespaceB
{
using System;
using FlatBuffers;
public sealed class TableInNestedNS : Table {

View File

@@ -0,0 +1,23 @@
# automatically generated, do not modify
# namespace: NamespaceB
import flatbuffers
class TableInNestedNS(object):
__slots__ = ['_tab']
# TableInNestedNS
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# TableInNestedNS
def Foo(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
def TableInNestedNSStart(builder): builder.StartObject(1)
def TableInNestedNSAddFoo(builder, foo): builder.PrependInt32Slot(0, foo, 0)
def TableInNestedNSEnd(builder): return builder.EndObject()