wabbajack/Wabbajack.Test/CompilationStackTests.cs

29 lines
840 B
C#
Raw Normal View History

2019-12-07 02:54:27 +00:00
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Lib.CompilationSteps;
namespace Wabbajack.Test
{
[TestClass]
public class CompilationStackTests : ACompilerTest
{
[TestMethod]
2019-12-07 02:54:27 +00:00
public async Task TestStackSerialization()
{
var profile = utils.AddProfile();
var mod = utils.AddMod("test");
utils.Configure();
2019-12-07 02:54:27 +00:00
var compiler = await ConfigureAndRunCompiler(profile);
var stack = compiler.MakeStack();
var serialized = Serialization.Serialize(stack);
var rounded = Serialization.Serialize(Serialization.Deserialize(serialized, compiler));
Assert.AreEqual(serialized, rounded);
Assert.IsNotNull(compiler.GetStack());
}
}
}