示例#1
0
        public void TestDiscId2Calculation()
        {
            Assert.AreEqual(
                0x00000002, // 2*1
                AccurateRip.CalculateDiscId2(new int[] { 2 })
                );

            Assert.AreEqual(
                0x000054f5, // 2*1 + 260*2 + 520*3 + 1763*4 + 2523*5
                AccurateRip.CalculateDiscId2(
                    new int[] {
                182 / 75,    // 2
                19527 / 75,  // 260
                39015 / 75,  // 520
                132282 / 75, // 1763
                189270 / 75  // 2523
            }
                    )
                );
        }
示例#2
0
        public void TestDiscId1Calculation()
        {
            Assert.AreEqual(
                0x00000002, // 2
                AccurateRip.CalculateDiscId1(new int[] { 2 })
                );

            Assert.AreEqual(
                0x000013cc, // 2 + 260 + 520 + 1763 + 2523
                AccurateRip.CalculateDiscId1(
                    new int[] {
                182 / 75,    // 2
                19527 / 75,  // 260
                39015 / 75,  // 520
                132282 / 75, // 1763
                189270 / 75  // 2523
            }
                    )
                );
        }