private void TestRoundTrip(NativeSymbol symbol) { var storage = new BasicSymbolStorage(); var name = NativeNameUtil.GetName(symbol); var globalSymbol = new NativeGlobalSymbol(name, symbol); storage.Add(globalSymbol); TestRoundTrip(storage); }
public void SimpleConversions() { Action <NativeSymbol, NativeNameKind> test = (s, kind) => { NativeName name; Assert.True(NativeNameUtil.TryGetName(s, out name)); Assert.Equal(new NativeName(s.Name, kind), name); }; test(new NativeStruct("test"), NativeNameKind.Struct); test(new NativeUnion("other"), NativeNameKind.Union); test(new NativeEnum("e"), NativeNameKind.Enum); }
public override IEnumerable <NativeName> GetInitialData() => Storage.NativeNames.Where(x => NativeNameUtil.IsAnyType(x.Kind));