Skip to content

Commit ceb7cda

Browse files
authored
Merge branch 'dev' into whitelisted-fee-definition
2 parents 557b6c9 + f3b8170 commit ceb7cda

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Neo.UnitTests/SmartContract/Native/UT_NativeContract.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ public void TestGenerateNativeContractApi()
300300

301301
var docsDirectory = LocateDocsDirectory(new DirectoryInfo(Directory.GetCurrentDirectory()));
302302
var outputPath = Path.Combine(docsDirectory.FullName, "native-contracts-api.md");
303+
var previousContent = File.Exists(outputPath) ? File.ReadAllText(outputPath) : "";
304+
303305
using (var writer = new StreamWriter(outputPath) { NewLine = "\n" })
304306
{
305307
writer.WriteLine("""
@@ -332,6 +334,11 @@ 3. A native contract method may have different behaviors in different hardforks.
332334
}
333335

334336
Assert.IsTrue(File.Exists(outputPath), $"Generated file should exist at {outputPath}");
337+
338+
if (!string.IsNullOrEmpty(previousContent))
339+
{
340+
Assert.AreEqual(previousContent.Trim(), File.ReadAllText(outputPath).Trim(), "Native contract api file was changed!");
341+
}
335342
}
336343

337344
private static DirectoryInfo LocateDocsDirectory(DirectoryInfo start)

0 commit comments

Comments
 (0)