From 774fd59f7f2533b02eb8e434335a44262fb9f470 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Thu, 28 Sep 2023 14:03:40 -0700 Subject: [PATCH] Fix CI tests Files on the system are slightly different on the GitHub CI. --- .../Win32/UI/WindowsAndMessaging/IconTests.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/thirtytwo_tests/Win32/UI/WindowsAndMessaging/IconTests.cs b/src/thirtytwo_tests/Win32/UI/WindowsAndMessaging/IconTests.cs index 80cea2a..fc191dc 100644 --- a/src/thirtytwo_tests/Win32/UI/WindowsAndMessaging/IconTests.cs +++ b/src/thirtytwo_tests/Win32/UI/WindowsAndMessaging/IconTests.cs @@ -9,12 +9,19 @@ namespace Windows.Win32.UI.WindowsAndMessaging; public class IconTests { - [Theory] - [InlineData("regedit.exe", 7)] - [InlineData(@"C:\Windows\System32\OneDrive.ico", 1)] - public void GetFileIconCount(string file, int expected) + [Fact] + public void GetFileIconCount_Regedit() + { + HICON.GetFileIconCount("regedit.exe").Should().BeOneOf(5, 7); + } + + [Fact] + public void GetFileIconCount_OneDrive() { - HICON.GetFileIconCount(file).Should().Be(expected); + if (File.Exists(@"C:\Windows\System32\OneDrive.ico")) + { + HICON.GetFileIconCount(@"C:\Windows\System32\OneDrive.ico").Should().Be(1); + } } [Fact]