File tree Expand file tree Collapse file tree
org.mixedrealitytoolkit.core/Tests/TestUtilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Copyright (c) Mixed Reality Toolkit Contributors
22// Licensed under the BSD 3-Clause
33
4- // Disable "missing XML comment" warning for tests. While nice to have, this documentation is not required.
5- #pragma warning disable CS1591
6- #if HAS_ASSET_STORE_VALIDATION
4+ #if HAS_ASSET_STORE_VALIDATION && UNITY_EDITOR
75
86using System ;
97using System . Collections . Generic ;
@@ -26,12 +24,7 @@ public static class PackageValidator
2624 /// </exception>
2725 public static PackageValidatorResults Validate ( string packageName )
2826 {
29- PackageInfo info = UpmPackageInfo ( packageName ) ;
30- if ( info == null )
31- {
32- throw new ArgumentException ( $ "No package found with name \" { packageName } \" ") ;
33- }
34-
27+ PackageInfo info = UpmPackageInfo ( packageName ) ?? throw new ArgumentException ( $ "No package found with name \" { packageName } \" ") ;
3528 string packageId = $ "{ info . name } @{ info . version } ";
3629 ValidationSuite . ValidatePackage ( packageId , ValidationType . AssetStore ) ;
3730
@@ -70,5 +63,5 @@ private static PackageInfo[] UpmListOffline(string packageIdOrName = null)
7063 }
7164 }
7265}
73- #endif // HAS_ASSET_STORE_VALIDATION
74- #pragma warning restore CS1591
66+
67+ #endif // HAS_ASSET_STORE_VALIDATION && UNITY_EDITOR
You can’t perform that action at this time.
0 commit comments