-
-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1159c65
commit 2de28f4
Showing
4 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/Silk.NET.SilkTouch.Scraper.Tests/NamespaceScrapingTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 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 NamespaceScrapingTests | ||
{ | ||
[Fact] | ||
public void NamespaceXMLGeneratesNamespaceSymbol() | ||
{ | ||
var doc = new XmlDocument(); | ||
doc.LoadXml(@"<bindings> | ||
<namespace name=""" + ClangScraper.LibraryNamespacePlaceholder + @"""> | ||
</namespace> | ||
</bindings> | ||
"); | ||
|
||
var symbols = new ClangScraper().ScrapeXML(doc); | ||
|
||
var symbol = Assert.Single(symbols); | ||
var @namespace = Assert.IsType<NamespaceSymbol>(symbol); | ||
Assert.Equal(ClangScraper.LibraryNamespacePlaceholder, @namespace.Identifier.Value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,6 @@ public class StructScrapingTests | |
[Fact] | ||
public void StructXMLGeneratesStructSymbol() | ||
{ | ||
|
||
} | ||
} |