Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs11-async
wiki-game
Commits
7fb1c10e
Commit
7fb1c10e
authored
4 years ago
by
Caleb C. Sander
Browse files
Options
Download
Email Patches
Plain Diff
Update paths
parent
77d3ba1e
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-1
README.md
tests/test.js
+67
-8
tests/test.js
with
68 additions
and
9 deletions
+68
-9
README.md
View file @
7fb1c10e
...
...
@@ -11,5 +11,5 @@ They try your `find-path.js` on various inputs.
To run them, you need to run
`npm install`
once and then
`npm test`
each time you want to run the tests.
Since Wikipedia can be edited at any time, the expected paths may become outdated.
I computed the lists of possible paths on 202
0-11-09
, so hopefully this isn't an issue.
I computed the lists of possible paths on 202
1-02-14
, so hopefully this isn't an issue.
Please let me know if you think you've found a valid path that is failing a test case; I can update the tests.
This diff is collapsed.
Click to expand it.
tests/test.js
View file @
7fb1c10e
...
...
@@ -38,7 +38,9 @@ const TESTS = [
source
:
'
San_Andreas_Fault
'
,
target
:
'
Mars
'
,
paths
:
[
[
'
San_Andreas_Fault
'
,
'
Geographic_coordinate_system
'
,
'
Mars
'
],
[
'
San_Andreas_Fault
'
,
'
JPL
'
,
'
Mars
'
],
[
'
San_Andreas_Fault
'
,
'
Main_Page
'
,
'
Mars
'
],
[
'
San_Andreas_Fault
'
,
'
National_Aeronautics_and_Space_Administration
'
,
...
...
@@ -62,6 +64,7 @@ const TESTS = [
[
'
Poseidon
'
,
'
Numina
'
,
'
Ahura_Mazda
'
],
[
'
Poseidon
'
,
'
Pantheism
'
,
'
Ahura_Mazda
'
],
[
'
Poseidon
'
,
'
Polytheism
'
,
'
Ahura_Mazda
'
],
[
'
Poseidon
'
,
'
Prayer
'
,
'
Ahura_Mazda
'
],
[
'
Poseidon
'
,
'
Proto-Indo-European_mythology
'
,
'
Ahura_Mazda
'
],
[
'
Poseidon
'
,
'
Theism
'
,
'
Ahura_Mazda
'
],
[
'
Poseidon
'
,
'
Uranus_(mythology)
'
,
'
Ahura_Mazda
'
]
...
...
@@ -76,13 +79,13 @@ const TESTS = [
[
'
Chapada
'
,
'
Geographic_coordinate_system
'
,
'
Against_the_Geography_of_Eratosthenes
'
,
'
Cyrene,_Libya
'
,
'
Classical_Athens
'
],
[
'
Chapada
'
,
'
Geographic_coordinate_system
'
,
'
Cyrene,_Libya
'
,
'
Hipparchus
'
,
'
Classical_Athens
'
],
[
...
...
@@ -161,6 +164,7 @@ const TESTS = [
],
[
'
National_University_of_Mongolia
'
,
'
Blue
'
,
'
White
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Blue
'
,
'
World_War_I
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Buryats
'
,
'
Kazakhs
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Doctorate
'
,
...
...
@@ -263,22 +267,22 @@ const TESTS = [
'
Madrasa
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Lyceum
'
,
'
Madrasa
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Lyceum
'
,
'
World_War_I
'
,
'
ISNI_(identifier)
'
,
'
British_Library
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Main_Page
'
,
'
Trump_House
'
,
'
Khorloogiin_Choibalsan
'
,
'
Kazakhs
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Lyceum
'
,
'
Madrasa
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Main_Page
'
,
'
Lyceum
'
,
'
World_War_I
'
,
'
Mecca
'
],
...
...
@@ -295,6 +299,7 @@ const TESTS = [
[
'
National_University_of_Mongolia
'
,
'
Mongolia
'
,
'
Demonym
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Mongolia
'
,
'
Islam
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Mongolia
'
,
'
Jordan
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Mongolia
'
,
'
Kazakhs
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Mongolia
'
,
...
...
@@ -393,6 +398,12 @@ const TESTS = [
'
Madrasa
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Prime_minister_of_Mongolia
'
,
'
Style_(form_of_address)
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Public_university
'
,
...
...
@@ -477,6 +488,12 @@ const TESTS = [
'
White
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Soviet_Union
'
,
'
Abrahamic_religions
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Soviet_Union
'
,
...
...
@@ -555,6 +572,18 @@ const TESTS = [
'
World_War_I
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Stalinist_repressions_in_Mongolia
'
,
'
Kazakhs
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
USSR
'
,
'
Abrahamic_religions
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
USSR
'
,
'
Asia
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
USSR
'
,
'
Closed_city
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
USSR
'
,
'
Demonym
'
,
'
Mecca
'
],
...
...
@@ -590,6 +619,12 @@ const TESTS = [
'
Bayan-%C3%96lgii_Province
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Ulaanbaatar
'
,
'
British_Library
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Ulaanbaatar
'
,
...
...
@@ -704,6 +739,12 @@ const TESTS = [
'
Arabic_language
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
VIAF_(identifier)
'
,
'
British_Library
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
VIAF_(identifier)
'
,
...
...
@@ -715,6 +756,12 @@ const TESTS = [
'
Zavkhan_Province
'
,
'
Bayan-%C3%96lgii_Province
'
,
'
Mecca
'
],
[
'
National_University_of_Mongolia
'
,
'
Zavkhan_Province
'
,
'
Kazakhs
'
,
'
Mecca
'
]
]
},
...
...
@@ -926,6 +973,12 @@ const TESTS = [
'
Rudolf_Carnap
'
,
'
Confucius
'
],
[
'
Graph_(discrete_mathematics)
'
,
'
Geographic_information_systems
'
,
'
Education
'
,
'
Confucius
'
],
[
'
Graph_(discrete_mathematics)
'
,
'
Geographic_information_systems
'
,
...
...
@@ -944,6 +997,12 @@ const TESTS = [
'
Linguistics
'
,
'
Confucius
'
],
[
'
Graph_(discrete_mathematics)
'
,
'
Graph_of_a_function
'
,
'
Gottfried_Wilhelm_Leibniz
'
,
'
Confucius
'
],
[
'
Graph_(discrete_mathematics)
'
,
'
Graph_rewriting
'
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help