mirror of
				https://github.com/nomic-ai/gpt4all.git
				synced 2025-11-04 07:55:24 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			688 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			688 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using Xunit;
 | 
						|
 | 
						|
namespace Gpt4All.Tests;
 | 
						|
 | 
						|
public static class Platforms
 | 
						|
{
 | 
						|
    public const string Windows = "windows";
 | 
						|
    public const string Linux = "linux";
 | 
						|
    public const string MacOS = "macOS";
 | 
						|
}
 | 
						|
 | 
						|
/// <summary>
 | 
						|
/// This attribute ensures the Fact is only run on the specified platform.
 | 
						|
/// </summary>
 | 
						|
/// <remarks>
 | 
						|
/// <see cref="OperatingSystem.IsOSPlatform(string)"/> for info about the platform string.
 | 
						|
/// </remarks>
 | 
						|
public class PlatformSpecificFactAttribute : FactAttribute
 | 
						|
{
 | 
						|
    public PlatformSpecificFactAttribute(string platform)
 | 
						|
    {
 | 
						|
        if (!OperatingSystem.IsOSPlatform(platform))
 | 
						|
        {
 | 
						|
            Skip = $"Test only runs on {platform}.";
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |