コード例 #1
0
        public void TestInitialize()
        {
            MonoNativePlatform.Initialize();
            var initialized = MonoNativePlatform.IsInitialized();

            Assert.IsTrue(initialized, "MonoNativePlatform.IsInitialized()");
        }
コード例 #2
0
ファイル: NativePlatformTest.cs プロジェクト: nearlity/mono
        public void Test()
        {
            var type = MonoNativePlatform.GetPlatformType();

            Assert.That((int)type, Is.GreaterThan(0), "platform type");

            var usingCompat = (type & MonoNativePlatformType.MONO_NATIVE_PLATFORM_TYPE_COMPAT) != 0;

            Assert.AreEqual(MonoNativeConfig.UsingCompat, usingCompat, "using compatibility layer");
        }
コード例 #3
0
        public void TestInternalCounter()
        {
            MonoNativePlatform.Initialize();

            var asm  = typeof(string).Assembly;
            var type = asm.GetType("Mono.MonoNativePlatform");

            Assert.IsNotNull(type, "MonoNativePlatform");

            var method = type.GetMethod("TestInternalCounter", BindingFlags.Static | BindingFlags.NonPublic);

            Assert.IsNotNull(method, "MonoNativePlatform.TestInternalCounter");
            var result = method.Invoke(null, null);

            Assert.That(result, Is.GreaterThan(0), "MonoNativePlatform.TestInternalCounter()");
        }
コード例 #4
0
        public void PlatformType()
        {
            var type = MonoNativePlatform.GetPlatformType();

            Assert.That((int)type, Is.GreaterThan(0), "platform type");
        }