예제 #1
0
        public void DllNaming_Default_GeneratesName()
        {
            var tuple = new ArchTuple <string>()
            {
                [Architecture.X86]   = "Test.dll",
                [Architecture.Arm]   = "Test.dll",
                [Architecture.X64]   = "Test64.dll",
                [Architecture.Arm64] = "Test64.dll",
            };
            string expected = tuple;

            var test = new TestWrapper();
            var name = test.ComposeDllName();

            Assert.AreEqual(expected, name);
        }
예제 #2
0
        public void DllNaming_ChangePrefix_GeneratesName()
        {
            var tuple = new ArchTuple <string>()
            {
                [Architecture.X86]   = "X86Test.dll",
                [Architecture.Arm]   = "ArmTest.dll",
                [Architecture.X64]   = "X64Test.dll",
                [Architecture.Arm64] = "Arm64Test.dll",
            };
            string expected = tuple;

            var test = new TestWrapper();

            SetBaseline(test);
            test.DllNamePrefix[Architecture.X86]   = "X86";
            test.DllNamePrefix[Architecture.Arm]   = "Arm";
            test.DllNamePrefix[Architecture.X64]   = "X64";
            test.DllNamePrefix[Architecture.Arm64] = "Arm64";

            var name = test.ComposeDllName();

            Assert.AreEqual(expected, name);
        }
예제 #3
0
        public void DllNaming_ChangeName_GeneratesName()
        {
            var tuple = new ArchTuple <string>()
            {
                [Architecture.X86]   = "FirstWrapper.dll",
                [Architecture.Arm]   = "SecondWrapper.dll",
                [Architecture.X64]   = "ThirdWrapper.dll",
                [Architecture.Arm64] = "FourthWrapper.dll",
            };
            string expected = tuple;

            var test = new TestWrapper();

            SetBaseline(test);
            test.DllName[Architecture.X86]   = "FirstWrapper";
            test.DllName[Architecture.Arm]   = "SecondWrapper";
            test.DllName[Architecture.X64]   = "ThirdWrapper";
            test.DllName[Architecture.Arm64] = "FourthWrapper";

            var name = test.ComposeDllName();

            Assert.AreEqual(expected, name);
        }
예제 #4
0
        public void DllNaming_ChangePath_GeneratesName()
        {
            var tuple = new ArchTuple <string>()
            {
                [Architecture.X86]   = "lib32\\Test.dll",
                [Architecture.Arm]   = "libarm\\Test.dll",
                [Architecture.X64]   = "lib64\\Test.dll",
                [Architecture.Arm64] = "libarm64\\Test.dll",
            };
            string expected = tuple;

            var test = new TestWrapper();

            SetBaseline(test);
            test.DllPath[Architecture.X86]   = "lib32\\";
            test.DllPath[Architecture.X64]   = "lib64\\";
            test.DllPath[Architecture.Arm]   = "libarm\\";
            test.DllPath[Architecture.Arm64] = "libarm64\\";

            var name = test.ComposeDllName();

            Assert.AreEqual(expected, name);
        }