deno.land / x / masx200_leetcode_test@10.6.5 / find-if-path-exists-in-graph / test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { assertEquals } from "https://deno.land/std@0.157.0/testing/asserts.ts";
import validPath from "./index.ts";import validPath2 from "./validPath.ts";
Deno.test("find-if-path-exists-in-graph", () => { testValidPath(validPath);});Deno.test("find-if-path-exists-in-graph", () => { testValidPath(validPath2);});function testValidPath(validPath: { ( n: number, edges: number[][], source: number, destination: number, ): boolean;}) { assertEquals(true, validPath(1, [], 0, 0)); assertEquals( false, validPath( 6, [ [0, 1], [0, 2], [3, 5], [5, 4], [4, 3], ], 0, 5, ), ); assertEquals( true, validPath( 3, [ [0, 1], [1, 2], [2, 0], ], 0, 2, ), );}
masx200_leetcode_test

Version Info

Tagged at
a year ago