示例#1
0
文件: Test.cs 项目: zarkodam/CodeWars
        public void FourNodesWithLoopSize3()
        {
            var loopDetector = new LoopDetector();

            LoopDetector.Node rootNode = new LoopDetector.Node();
            loopDetector.CreateChain(2, 3, rootNode, rootNode);
            Assert.AreEqual(3, Task.GetLoopSize(rootNode));
        }
示例#2
0
文件: Test.cs 项目: zarkodam/CodeWars
        public void RandomChainNodesWithLoopSize30()
        {
            var loopDetector = new LoopDetector();

            LoopDetector.Node rootNode = new LoopDetector.Node();
            loopDetector.CreateChain(3, 30, rootNode, rootNode);
            Assert.AreEqual(30, Task.GetLoopSize(rootNode));
        }