From 271601dfe0990917ef6331fbddcfd1b400882eb2 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 26 Mar 2020 13:31:04 -0400 Subject: Add intermediate levels to track how IR has been lowered. --- src/test/WixToolsetTest.Data/SerializeFixture.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/test') diff --git a/src/test/WixToolsetTest.Data/SerializeFixture.cs b/src/test/WixToolsetTest.Data/SerializeFixture.cs index 34e50f36..55460d54 100644 --- a/src/test/WixToolsetTest.Data/SerializeFixture.cs +++ b/src/test/WixToolsetTest.Data/SerializeFixture.cs @@ -26,13 +26,21 @@ namespace WixToolsetTest.Data Location = ComponentLocation.Either, }); - var intermediate = new Intermediate("TestIntermediate", new[] { section }, null); + var intermediate = new Intermediate("TestIntermediate", IntermediateLevels.Compiled, new[] { section }, null); + + intermediate.UpdateLevel(IntermediateLevels.Linked); + intermediate.UpdateLevel(IntermediateLevels.Resolved); var path = Path.GetTempFileName(); intermediate.Save(path); var loaded = Intermediate.Load(path); + Assert.True(loaded.HasLevel(IntermediateLevels.Compiled)); + Assert.True(loaded.HasLevel(IntermediateLevels.Linked)); + Assert.True(loaded.HasLevel(IntermediateLevels.Resolved)); + Assert.False(loaded.HasLevel(WixToolset.Data.WindowsInstaller.IntermediateLevels.PartiallyBound)); + var tuple = (ComponentTuple)loaded.Sections.Single().Tuples.Single(); Assert.Equal("TestComponent", tuple.Id.Id); -- cgit v1.2.3-55-g6feb