On Sat Sep 30 15:14:58 2023 +0000, Zhiyi Zhang wrote:
I think these tests might be a bit too much. I like the initial version that uses RegGetValueA() and confirms the registry value is the opposite of the ShouldSystemUseDarkMode. With some checks for the last error code and I think that's enough. These newly added tests confirm caching for ShouldSystemUseDarkMode() and that's good. However, ShouldSystemUseDarkMode() still need to query the registry key so it's not that useful.
Also, what I thought was caching was actually the function reading from SystemUsesLightTheme, so that whole part of the test was useless. (You can also test this on Windows as when the registry values are mismatched, the test fails.)
Added this to latest version of commit.