コード例 #1
0
        public void CanLocateTestLibrary()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var lines = MacOSDependencyChecker.LaunchOtool(graphicsLib);

            Assert.That(lines, Is.Not.Null);
        }
コード例 #2
0
        public void DependencyMapOfTestLibraryHasCorrectFilePath()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var dm = MacOSDependencyChecker.GetDependencies(graphicsLib);

            Assert.That(dm.file, Is.EqualTo(graphicsLib));
        }
コード例 #3
0
        public void MachineHasXCodeTools()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var areToolsInstalled = (MacOSDependencyChecker.IsXcodeToolInstalled("lipo") && MacOSDependencyChecker.IsXcodeToolInstalled("otool"));

            Assert.IsTrue(areToolsInstalled);
        }
コード例 #4
0
        public void DependencyMapOfTestLibraryHasAllDependenciesExist()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var dm = MacOSDependencyChecker.GetDependencies(graphicsLib);

            using (new WorkingDirectoryShift(Path.GetDirectoryName(graphicsLib)))
                Assert.That(dm.dependencies, Has.All.Exist);
        }
コード例 #5
0
        public void DependencyMapOfTestLibraryHasDependencies()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var           dm        = MacOSDependencyChecker.GetDependencies(graphicsLib);
            Func <string> errorFunc = () => {
                var sb = new StringBuilder();
                sb.AppendFormat("wrong number of deps for {0}", dm.file);
                sb.AppendLine();
                foreach (var item in dm.dependencies)
                {
                    sb.AppendFormat("item: {0}", item);
                    sb.AppendLine();
                }
                return(sb.ToString());
            };

            Assert.That(dm.dependencies.Count, Is.GreaterThanOrEqualTo(4), errorFunc);
        }