-
-
Notifications
You must be signed in to change notification settings - Fork 457
Expand file tree
/
Copy pathStructScrapingTests.cs
More file actions
36 lines (28 loc) · 1 KB
/
StructScrapingTests.cs
File metadata and controls
36 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Xml;
using Silk.NET.SilkTouch.Symbols;
using Xunit;
namespace Silk.NET.SilkTouch.Scraper.Tests;
public class StructScrapingTests
{
[Fact]
public void StructXMLGeneratesStructSymbol()
{
var doc = new XmlDocument();
doc.LoadXml(@"<struct name=""Test""></struct>");
var symbols = new ClangScraper().ScrapeXML(doc);
var symbol = Assert.Single(symbols);
var @struct = Assert.IsType<StructSymbol>(symbol);
}
[Fact]
public void StructXMLGeneratesCorrectIdentifier()
{
var doc = new XmlDocument();
doc.LoadXml(@"<struct name=""Test""></struct>");
var symbols = new ClangScraper().ScrapeXML(doc);
var symbol = Assert.Single(symbols);
var @struct = Assert.IsType<StructSymbol>(symbol);
Assert.Equal("Test", @struct.Identifier.Value);
}
}