コード例 #1
0
        public void LinkedListSingleLinkPartition2StableUseDummyNodesTest1NullList()
        {
            LinkedListSingleLinkNode <int> actual = null;

            LinkedListSingleLinkPartition2StableUseDummyNodesComplete.Partition(ref actual, 7);
            Assert.IsTrue(LinkedListSingleLinkNode <int> .Compare(null, actual));
        }
コード例 #2
0
        public void LinkedListSingleLinkPartition2StableUseDummyNodesTest7AllBefore()
        {
            var actual = LinkedListSingleLinkNode <int> .CreateFromData(1, 2, 8, 7, 5, 3);

            var expected = LinkedListSingleLinkNode <int> .CreateFromData(1, 2, 8, 7, 5, 3);

            LinkedListSingleLinkPartition2StableUseDummyNodesComplete.Partition(ref actual, 9);
            Assert.IsTrue(LinkedListSingleLinkNode <int> .Compare(expected, actual));
        }
コード例 #3
0
        public void LinkedListSingleLinkPartition2StableUseDummyNodesTest6SingleBeforeAfter()
        {
            var actual = LinkedListSingleLinkNode <int> .CreateFromData(3, 2, 1);

            var expected = LinkedListSingleLinkNode <int> .CreateFromData(1, 3, 2);

            LinkedListSingleLinkPartition2StableUseDummyNodesComplete.Partition(ref actual, 2);
            Assert.IsTrue(LinkedListSingleLinkNode <int> .Compare(expected, actual));
        }