@@ -4,92 +4,91 @@ import org.nlogo.core.TokenType
44import org .nlogo .core .TokenType .Command
55
66class NLWTests extends TestModels {
7+ val unsupportedPrimitives = Set (
8+ // This is sort of a lie as of 2020-11-18
9+ // but we leave it for simplicity.
10+ " extensions" ,
11+ // Inspect in progress
12+ " inspect" ,
713
8- val unsupportedPrimitives = Set (
9- // This is sort of a lie as of 2020-11-18
10- // but we leave it for simplicity.
11- " extensions" ,
12- // Inspect in progress
13- " inspect" ,
14+ " __set-line-thickness" ,
1415
15- " __set-line-thickness" ,
16+ // HubNet Prims
17+ " hubnet-broadcast" ,
18+ " hubnet-broadcast-clear-output" ,
19+ " hubnet-broadcast-message" ,
20+ " hubnet-clear-override" ,
21+ " hubnet-clear-overrides" ,
22+ " hubnet-clients-list" ,
23+ " hubnet-enter-message?" ,
24+ " hubnet-exit-message?" ,
25+ " hubnet-fetch-message" ,
26+ " hubnet-kick-all-clients" ,
27+ " hubnet-kick-client" ,
28+ " hubnet-message" ,
29+ " hubnet-message-source" ,
30+ " hubnet-message-tag" ,
31+ " hubnet-message-waiting?" ,
32+ " hubnet-reset" ,
33+ " hubnet-reset-perspective" ,
34+ " hubnet-send" ,
35+ " hubnet-send-clear-output" ,
36+ " hubnet-send-follow" ,
37+ " hubnet-send-message" ,
38+ " hubnet-send-override" ,
39+ " hubnet-send-watch" ,
1640
17- // HubNet Prims
18- " hubnet-broadcast" ,
19- " hubnet-broadcast-clear-output" ,
20- " hubnet-broadcast-message" ,
21- " hubnet-clear-override" ,
22- " hubnet-clear-overrides" ,
23- " hubnet-clients-list" ,
24- " hubnet-enter-message?" ,
25- " hubnet-exit-message?" ,
26- " hubnet-fetch-message" ,
27- " hubnet-kick-all-clients" ,
28- " hubnet-kick-client" ,
29- " hubnet-message" ,
30- " hubnet-message-source" ,
31- " hubnet-message-tag" ,
32- " hubnet-message-waiting?" ,
33- " hubnet-reset" ,
34- " hubnet-reset-perspective" ,
35- " hubnet-send" ,
36- " hubnet-send-clear-output" ,
37- " hubnet-send-follow" ,
38- " hubnet-send-message" ,
39- " hubnet-send-override" ,
40- " hubnet-send-watch" ,
41+ // Synchrony Plagued
42+ " import-pcolors" ,
43+ " import-pcolors-rgb" ,
44+ " import-world" ,
45+ " display" ,
46+ " no-display" ,
47+ " wait" ,
48+ " user-one-of" ,
49+ " export-interface" ,
4150
42- // Synchrony Plagued
43- " import-pcolors" ,
44- " import-pcolors-rgb" ,
45- " import-world" ,
46- " display" ,
47- " no-display" ,
48- " wait" ,
49- " user-one-of" ,
50- " export-interface" ,
51+ // Ask Concurrent (s)
52+ " ask-concurrent" ,
53+ " without-interruption" ,
5154
52- // Ask Concurrent (s)
53- " ask-concurrent" ,
54- " without-interruption" ,
55-
56- // File
57- " file-at-end?" ,
58- " file-close" ,
59- " file-close-all" ,
60- " file-delete" ,
61- " file-exists?" ,
62- " file-flush" ,
63- " file-open" ,
64- " file-print" ,
65- " file-read" ,
66- " file-read-characters" ,
67- " file-read-line" ,
68- " file-show" ,
69- " file-type" ,
70- " file-write" ,
71- " set-current-directory" ,
72- " user-directory" ,
73- " user-file" ,
74- " user-new-file"
75- )
55+ // File
56+ " file-at-end?" ,
57+ " file-close" ,
58+ " file-close-all" ,
59+ " file-delete" ,
60+ " file-exists?" ,
61+ " file-flush" ,
62+ " file-open" ,
63+ " file-print" ,
64+ " file-read" ,
65+ " file-read-characters" ,
66+ " file-read-line" ,
67+ " file-show" ,
68+ " file-type" ,
69+ " file-write" ,
70+ " set-current-directory" ,
71+ " user-directory" ,
72+ " user-file" ,
73+ " user-new-file"
74+ )
7675
7776 if (onLocal) {
78- /* This is really just a placeholder for more advanced tests that
79- * determine the viability of a library model for NLW. Right now,
80- * we just check for prims that have yet to be implemented in
81- * NLW. On run on local since it's not a helpful failure. Update these
82- * occasionally from some authoritative source. I'v been using
83- * https://github.com/NetLogo/Tortoise/wiki/Unimplemented-Primitives
84- *
85- * CB 2020-11-17.
86- */
87- testModels(" All primitives are supported by NLW" ) { model =>
88- val tokenNames = new Tokens (model).primitiveTokenNames.toSet
89- for {
90- prim <- unsupportedPrimitives
91- if tokenNames.contains(prim)
92- } yield " uses " + prim
93- }
77+ /* This is really just a placeholder for more advanced tests that
78+ * determine the viability of a library model for NLW. Right now,
79+ * we just check for prims that have yet to be implemented in
80+ * NLW. On run on local since it's not a helpful failure. Update these
81+ * occasionally from some authoritative source. I'v been using
82+ * https://github.com/NetLogo/Tortoise/wiki/Unimplemented-Primitives
83+ *
84+ * CB 2020-11-17.
85+ */
86+ testModels(" All primitives are supported by NLW" ) { model =>
87+ val tokenNames = new Tokens (model).primitiveTokenNames.toSet
88+ for {
89+ prim <- unsupportedPrimitives
90+ if tokenNames.contains(prim)
91+ } yield " uses " + prim
92+ }
9493 }
9594}
0 commit comments