diff --git a/Content.Tests/DMProject/BrokenTests/Const/ConstSort.dm b/Content.Tests/DMProject/BrokenTests/Const/ConstSort.dm deleted file mode 100644 index 95ee128405..0000000000 --- a/Content.Tests/DMProject/BrokenTests/Const/ConstSort.dm +++ /dev/null @@ -1,21 +0,0 @@ -/obj/ConstSortObj - var/const/ConstSortObj_c3 = static_ConstSortObj.ConstSortObj_c1 + static_ConstSortObj.ConstSortObj_c2 - -/obj/ConstSortObj - var/const/ConstSortObj_c2 = static_ConstSortObj.ConstSortObj_b - -/obj/ConstSortObj - var/const/ConstSortObj_c1 = static_ConstSortObj.ConstSortObj_a - -/obj/ConstSortObj - var/static/obj/static_ConstSortObj = new - var/const/ConstSortObj_a = 7 - var/const/ConstSortObj_b = 8 - -/proc/RunTest() - var/obj/ConstSortObj/o = new - ASSERT(o.ConstSortObj_c1 == 7) - ASSERT(o.ConstSortObj_c2 == 8) - ASSERT(o.ConstSortObj_c3 == 15) - ASSERT(o.ConstSortObj_a == 7) - ASSERT(o.ConstSortObj_b == 8) diff --git a/Content.Tests/DMProject/BrokenTests/Expression/escape_identifier.dm b/Content.Tests/DMProject/BrokenTests/Expression/escape_identifier.dm index ebfc2af8a7..82d24b3cdb 100644 --- a/Content.Tests/DMProject/BrokenTests/Expression/escape_identifier.dm +++ b/Content.Tests/DMProject/BrokenTests/Expression/escape_identifier.dm @@ -10,7 +10,7 @@ var/\justident = "justident" /proc/RunTest() - var/list/expected = list("6*6", "37", "38", " ", " 3", " ", "improper", "justident") + var/list/expected = list("6*6", "37", "38", " ", " 3", " ", "improper", "justident") var/newtype/o = new for(var/i in 1 to expected.len) ASSERT(expected[i] == o.vars[i]) diff --git a/Content.Tests/DMProject/BrokenTests/Indent/closing_brace.dm b/Content.Tests/DMProject/BrokenTests/Indent/closing_brace.dm deleted file mode 100644 index 29996f8078..0000000000 --- a/Content.Tests/DMProject/BrokenTests/Indent/closing_brace.dm +++ /dev/null @@ -1,12 +0,0 @@ - -//# issue 512 - -/proc/closing_brace1() { - var/z = 1 - if (z) { - . = z++ - } - } - -/proc/RunTest() - ASSERT(closing_brace1() == 2) diff --git a/Content.Tests/DMProject/BrokenTests/Indent/ignore_close_bracket_indent.dm b/Content.Tests/DMProject/BrokenTests/Indent/ignore_close_bracket_indent.dm deleted file mode 100644 index 41e41bd693..0000000000 --- a/Content.Tests/DMProject/BrokenTests/Indent/ignore_close_bracket_indent.dm +++ /dev/null @@ -1,11 +0,0 @@ -datum{ - verb/a(){ - // nothing - } - verb/b(){ - - } - } - -/proc/RunTest() - return diff --git a/Content.Tests/DMProject/BrokenTests/Procs/allow_null_argname.dm b/Content.Tests/DMProject/BrokenTests/Procs/allow_null_argname.dm index 1ac697983c..3978bb8b51 100644 --- a/Content.Tests/DMProject/BrokenTests/Procs/allow_null_argname.dm +++ b/Content.Tests/DMProject/BrokenTests/Procs/allow_null_argname.dm @@ -1,8 +1,10 @@ -// TODO: BYOND allows var/null, OpenDream does not. Revisit when errors can be selectively disabled by pragmas +// COMPILE ERROR +// NOBYOND +// TODO: BYOND allows var/null, OpenDream should not. Revisit when errors can be selectively disabled by pragmas /proc/nullproc(null, a, b) - ASSERT(null == 4) + ASSERT(null != 4) ASSERT(a == 5) ASSERT(b == 6) diff --git a/Content.Tests/DMProject/BrokenTests/Statements/For/fakeout4.dm b/Content.Tests/DMProject/BrokenTests/Statements/For/fakeout4.dm deleted file mode 100644 index 5e63f55020..0000000000 --- a/Content.Tests/DMProject/BrokenTests/Statements/For/fakeout4.dm +++ /dev/null @@ -1,6 +0,0 @@ - - -/proc/RunTest() - for (var/x in 1 to 20; out < 10) - ASSERT(!isnum(x)) - break // Infinite loop diff --git a/Content.Tests/DMProject/BrokenTests/Statements/For/var_only.dm b/Content.Tests/DMProject/BrokenTests/Statements/For/var_only.dm deleted file mode 100644 index 9ae79d5bfa..0000000000 --- a/Content.Tests/DMProject/BrokenTests/Statements/For/var_only.dm +++ /dev/null @@ -1,8 +0,0 @@ - -// TODO This test needs to be fixed up and tested in actual BYOND using the unit test DME, not a discord compiler bot, and I cba - -/proc/main() - var/list/forvals = list() - for (var/X) - forvals += X - // insert some assertion here \ No newline at end of file diff --git a/Content.Tests/DMProject/BrokenTests/Statements/For/var_only_as.dm b/Content.Tests/DMProject/BrokenTests/Statements/For/var_only_as.dm deleted file mode 100644 index ae900779dd..0000000000 --- a/Content.Tests/DMProject/BrokenTests/Statements/For/var_only_as.dm +++ /dev/null @@ -1,34 +0,0 @@ - -// TODO This test needs to be fixed up and tested in actual BYOND using the unit test DME, not a discord compiler bot, and I cba - -/proc/main() - - var/list/forvals = list() - for (var/X as anything) - forvals += X - LOG("anything", forvals) - - forvals = list() - for (var/X as area) - forvals += X - LOG("area", forvals) - - forvals = list() - for (var/X as turf) - forvals += X - LOG("turf", forvals) - - forvals = list() - for (var/X as obj) - forvals += X - LOG("obj", forvals) - - forvals = list() - for (var/X as mob) - forvals += X - LOG("mob", forvals) - - forvals = list() - for (var/X as num) - forvals += X - LOG("num", forvals) \ No newline at end of file diff --git a/Content.Tests/DMProject/BrokenTests/Statements/For/var_only_typed.dm b/Content.Tests/DMProject/BrokenTests/Statements/For/var_only_typed.dm deleted file mode 100644 index 24e0f61617..0000000000 --- a/Content.Tests/DMProject/BrokenTests/Statements/For/var_only_typed.dm +++ /dev/null @@ -1,40 +0,0 @@ - -// TODO This test needs to be fixed up and tested in actual BYOND using the unit test DME, not a discord compiler bot, and I cba - -/proc/main() - var/list/forvals = list() - - forvals = list() - for (var/datum/X) - forvals += X - LOG("datum", forvals) - - forvals = list() - for (var/atom/X) - forvals += X - LOG("atom", forvals) - - forvals = list() - for (var/area/X) - forvals += X - LOG("area", forvals) - - forvals = list() - for (var/turf/X) - forvals += X - LOG("turf", forvals) - - forvals = list() - for (var/mob/X) - forvals += X - LOG("mob", forvals) - - forvals = list() - for (var/obj/X) - forvals += X - LOG("obj", forvals) - - forvals = list() - for (var/atom/movable/X) - forvals += X - LOG("atom/movable", forvals) \ No newline at end of file diff --git a/Content.Tests/DMProject/BrokenTests/Tree/Global/StaticScope/scope5.dm b/Content.Tests/DMProject/BrokenTests/Tree/Global/StaticScope/scope5.dm index c55c057d24..952a9ac749 100644 --- a/Content.Tests/DMProject/BrokenTests/Tree/Global/StaticScope/scope5.dm +++ b/Content.Tests/DMProject/BrokenTests/Tree/Global/StaticScope/scope5.dm @@ -1,11 +1,12 @@ // TODO: This test needs some more work for it to be usable, as the log in aproc() is sometimes null and sometimes 5 +var/count = 0 /proc/veryfalse() return 0 == 1 /proc/aproc() var/static/a = bproc() - world.log << (a) + count += a if (veryfalse()) return a else @@ -13,12 +14,13 @@ /proc/bproc() var/static/b = aproc() - world.log << (b) + count += b if (veryfalse()) return b else return 5 -/proc/main() - world.log << (aproc()) - world.log << (bproc()) +/proc/RunTest() + ASSERT(aproc() == 5) + ASSERT(bproc() == 5) + ASSERT(count == 15) diff --git a/Content.Tests/DMProject/BrokenTests/Tree/Override/override_x.dm b/Content.Tests/DMProject/BrokenTests/Tree/Override/override_x.dm index d0ae759372..ce7a2d4333 100644 --- a/Content.Tests/DMProject/BrokenTests/Tree/Override/override_x.dm +++ b/Content.Tests/DMProject/BrokenTests/Tree/Override/override_x.dm @@ -1,4 +1,5 @@ +// NOBYOND // TODO This test doesn't work in BYOND but I'm not sure why. var/x = 1 diff --git a/Content.Tests/DMProject/Tests/Arg/AmbiguousArgsVar.dm b/Content.Tests/DMProject/Tests/Arg/AmbiguousArgsVar.dm index b512dd6e77..86d3b06ed9 100644 --- a/Content.Tests/DMProject/Tests/Arg/AmbiguousArgsVar.dm +++ b/Content.Tests/DMProject/Tests/Arg/AmbiguousArgsVar.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma SoftReservedKeyword warning //global src def diff --git a/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword1.dm b/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword1.dm index 4b01602785..47250b1169 100644 --- a/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword1.dm +++ b/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword1.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD2000 +// NOBYOND var/src = 321 /proc/RunTest() diff --git a/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword2.dm b/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword2.dm index 77e08f20cf..5e92c59b3d 100644 --- a/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword2.dm +++ b/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword2.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD2000 +// NOBYOND /proc/test(args) return 1 diff --git a/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword3.dm b/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword3.dm index bee857f460..8e833b0fa2 100644 --- a/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword3.dm +++ b/Content.Tests/DMProject/Tests/Arg/SoftReservedKeyword3.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD2000 +// NOBYOND /proc/RunTest() var/usr = 123 world.log << "fail" diff --git a/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log2.dm b/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log2.dm index c914abc297..c4e2f2915b 100644 --- a/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log2.dm +++ b/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log2.dm @@ -1,5 +1,5 @@ // COMPILE ERROR OD0100 - +// NOBYOND /proc/RunTest() var/foo = log("e") diff --git a/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log3.dm b/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log3.dm index 22cfa70d66..2ef88b609d 100644 --- a/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log3.dm +++ b/Content.Tests/DMProject/Tests/Builtins/FallbackBuiltinArgs/badarg_log3.dm @@ -1,5 +1,5 @@ // COMPILE ERROR OD0100 - +// NOBYOND /proc/RunTest() var/foo = log(2,"e") diff --git a/Content.Tests/DMProject/Tests/Builtins/Spantext.dm b/Content.Tests/DMProject/Tests/Builtins/Spantext.dm index 3e7d3d8891..7a07ea3c47 100644 --- a/Content.Tests/DMProject/Tests/Builtins/Spantext.dm +++ b/Content.Tests/DMProject/Tests/Builtins/Spantext.dm @@ -8,7 +8,9 @@ ASSERT(spantext("aaa","a",-4) == 3) //spantext_char tests ASSERT(spantext_char("apples, oranges",", ",7) == 2) +#ifdef OPENDREAM ASSERT(spantext("aa𐀀𐀀bb", "b", 5) == 0) ASSERT(spantext_char("aaa","a",-4) == 3) ASSERT(spantext("aa𐀀𐀀bb", "𐀀",3) == 4) //DM evaluates this as 8 and the next as 4. Because it mangles - ASSERT(spantext_char("aa𐀀𐀀bb", "𐀀",3) == 2) //the chars. We instead want 4 and 2 respectively. \ No newline at end of file + ASSERT(spantext_char("aa𐀀𐀀bb", "𐀀",3) == 2) //the chars. We instead want 4 and 2 respectively. +#endif \ No newline at end of file diff --git a/Content.Tests/DMProject/Tests/Builtins/callee.dm b/Content.Tests/DMProject/Tests/Builtins/callee.dm index e0d3ac6dcc..1a52878593 100644 --- a/Content.Tests/DMProject/Tests/Builtins/callee.dm +++ b/Content.Tests/DMProject/Tests/Builtins/callee.dm @@ -7,7 +7,7 @@ /proc/RunTest() ASSERT(callee.name == "RunTest") - ASSERT(callee.file == "callee.dm") + ASSERT(copytext(callee.file, -9) == "callee.dm") var/callee/expired_callee = bar() var/failed = FALSE diff --git a/Content.Tests/DMProject/Tests/Builtins/initial_bad_arg.dm b/Content.Tests/DMProject/Tests/Builtins/initial_bad_arg.dm index 2a191eb39b..adae16d979 100644 --- a/Content.Tests/DMProject/Tests/Builtins/initial_bad_arg.dm +++ b/Content.Tests/DMProject/Tests/Builtins/initial_bad_arg.dm @@ -1,4 +1,5 @@ // COMPILE ERROR OD0100 +// NOBYOND /proc/RunTest() var/foo initial(issaved(foo)) diff --git a/Content.Tests/DMProject/Tests/Builtins/rgb/rgb2num.dm b/Content.Tests/DMProject/Tests/Builtins/rgb/rgb2num.dm index 1d8d54fe40..b1bbb28fa1 100644 --- a/Content.Tests/DMProject/Tests/Builtins/rgb/rgb2num.dm +++ b/Content.Tests/DMProject/Tests/Builtins/rgb/rgb2num.dm @@ -10,6 +10,8 @@ COLORCOMPARE(rgb2num("#0000ff"), 0, 0, 255) COLORCOMPARE(rgb2num("#12f5e6"), 18, 245, 230) COLORCOMPARE(rgb2num("#ca60db", COLORSPACE_RGB), 202, 96, 219) +#ifdef OPENDREAM COLORCOMPARE(rgb2num("#ca60db", COLORSPACE_HSV), 291.70734, 56.164383, 85.882355) COLORCOMPARE(rgb2num("#ca60db", COLORSPACE_HSL), 291.70734, 63.07692, 61.764706) - //COLORCOMPARE(rgb2num("#ca60db", COLORSPACE_HCY), 291.70734, 68.2215, 55.423534) // TODO Support HCY \ No newline at end of file + //COLORCOMPARE(rgb2num("#ca60db", COLORSPACE_HCY), 291.70734, 68.2215, 55.423534) // TODO Support HCY +#endif \ No newline at end of file diff --git a/Content.Tests/DMProject/Tests/Builtins/world_error_infinite_loop.dm b/Content.Tests/DMProject/Tests/Builtins/world_error_infinite_loop.dm index 306fcfa325..e64d860759 100644 --- a/Content.Tests/DMProject/Tests/Builtins/world_error_infinite_loop.dm +++ b/Content.Tests/DMProject/Tests/Builtins/world_error_infinite_loop.dm @@ -1,4 +1,5 @@ //RUNTIME ERROR, RETURN TRUE +// NOBYOND -- this test won't work in the byond testing framework because it writes out runtimes var/error_loop_count = 0 /world/Error() diff --git a/Content.Tests/DMProject/Tests/Builtins/world_opendream_topic_port.dm b/Content.Tests/DMProject/Tests/Builtins/world_opendream_topic_port.dm index a815651f3f..8d6f64b2dc 100644 --- a/Content.Tests/DMProject/Tests/Builtins/world_opendream_topic_port.dm +++ b/Content.Tests/DMProject/Tests/Builtins/world_opendream_topic_port.dm @@ -1,3 +1,3 @@ - +// NOBYOND /proc/RunTest() ASSERT(isnum(world.opendream_topic_port)) diff --git a/Content.Tests/DMProject/Tests/Call/LateralPointlessOverride.dm b/Content.Tests/DMProject/Tests/Call/LateralPointlessOverride.dm index 8593c93d58..8937a1f532 100644 --- a/Content.Tests/DMProject/Tests/Call/LateralPointlessOverride.dm +++ b/Content.Tests/DMProject/Tests/Call/LateralPointlessOverride.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma PointlessParentCall error // don't emit the pragma if lateral overrides exist diff --git a/Content.Tests/DMProject/Tests/Call/NonexistantProc.dm b/Content.Tests/DMProject/Tests/Call/NonexistantProc.dm index 2b7e04c0c7..2513648ae4 100644 --- a/Content.Tests/DMProject/Tests/Call/NonexistantProc.dm +++ b/Content.Tests/DMProject/Tests/Call/NonexistantProc.dm @@ -1,4 +1,5 @@ // RUNTIME ERROR +// NOBYOND - compile error in byond /proc/RunTest() world:nonexistent_proc() \ No newline at end of file diff --git a/Content.Tests/DMProject/Tests/List/AssocListAdd.dm b/Content.Tests/DMProject/Tests/List/AssocListAdd.dm index b3b70c4136..a73e63beda 100644 --- a/Content.Tests/DMProject/Tests/List/AssocListAdd.dm +++ b/Content.Tests/DMProject/Tests/List/AssocListAdd.dm @@ -6,9 +6,3 @@ L1 += L2 ASSERT(L1["B"] == 2) - ASSERT(L1.len == 2) - - // Lists are fun - L1 += L2 - ASSERT(L1[3] == "B") - ASSERT(L1.len == 3) \ No newline at end of file diff --git a/Content.Tests/DMProject/Tests/List/CreateAssociativeList.dm b/Content.Tests/DMProject/Tests/List/CreateAssociativeList.dm index 1fd53d2fc0..f3d5e7ecbf 100644 --- a/Content.Tests/DMProject/Tests/List/CreateAssociativeList.dm +++ b/Content.Tests/DMProject/Tests/List/CreateAssociativeList.dm @@ -13,4 +13,3 @@ ASSERT(L[b] == 2) ASSERT(L["c"] == 3) ASSERT(L[c] == null) - ASSERT(L.len == 3) diff --git a/Content.Tests/DMProject/Tests/List/ListCut.dm b/Content.Tests/DMProject/Tests/List/ListCut.dm index 4d23ff7acf..60da0d7c10 100644 --- a/Content.Tests/DMProject/Tests/List/ListCut.dm +++ b/Content.Tests/DMProject/Tests/List/ListCut.dm @@ -9,15 +9,3 @@ ASSERT(A ~= list("b" = 20)) ASSERT(A["a"] == null) ASSERT(A["b"] == 20) - - A = list(a = 10) - A += A - A.Cut(1, 2) - ASSERT(A ~= list("a")) - ASSERT(A["a"] == null) - - A = list(a = 10) - A += A - A.Cut(2, 0) - ASSERT(A ~= list("a")) - ASSERT(A["a"] == null) \ No newline at end of file diff --git a/Content.Tests/DMProject/Tests/List/ListNegativeSizePragma.dm b/Content.Tests/DMProject/Tests/List/ListNegativeSizePragma.dm index 87de22aebb..d37d613e79 100644 --- a/Content.Tests/DMProject/Tests/List/ListNegativeSizePragma.dm +++ b/Content.Tests/DMProject/Tests/List/ListNegativeSizePragma.dm @@ -1,4 +1,5 @@ // RUNTIME ERROR +// NOBYOND #pragma ListNegativeSizeException error /proc/DecrementList() diff --git a/Content.Tests/DMProject/Tests/Operators/Overloads/complex_numbers.dm b/Content.Tests/DMProject/Tests/Operators/Overloads/complex_numbers.dm index e59a396004..83150ca8e6 100644 --- a/Content.Tests/DMProject/Tests/Operators/Overloads/complex_numbers.dm +++ b/Content.Tests/DMProject/Tests/Operators/Overloads/complex_numbers.dm @@ -38,6 +38,7 @@ proc/operator|(datum/complex/C) //nonsense, used for testing src.a = C.a + return src proc/operator[](index) switch(index) diff --git a/Content.Tests/DMProject/Tests/Operators/modulo_modulo.dm b/Content.Tests/DMProject/Tests/Operators/modulo_modulo.dm index b7cf89c925..95fc99d25a 100644 --- a/Content.Tests/DMProject/Tests/Operators/modulo_modulo.dm +++ b/Content.Tests/DMProject/Tests/Operators/modulo_modulo.dm @@ -1,3 +1,4 @@ +// NOBYOND // BREAKING CHANGE: The floating point precision is slightly different between OD and BYOND, giving slightly different values /proc/RunTest() ASSERT(5.89254 %% 2.3462 == 1.2001398) diff --git a/Content.Tests/DMProject/Tests/Preprocessor/Pragma/pragma_warning.dm b/Content.Tests/DMProject/Tests/Preprocessor/Pragma/pragma_warning.dm index 00205b3a7c..9f0d1d3cd4 100644 --- a/Content.Tests/DMProject/Tests/Preprocessor/Pragma/pragma_warning.dm +++ b/Content.Tests/DMProject/Tests/Preprocessor/Pragma/pragma_warning.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD1201 +// NOBYOND #pragma WarningDirective error diff --git a/Content.Tests/DMProject/Tests/Preprocessor/Variadic/variadic_must_be_last.dm b/Content.Tests/DMProject/Tests/Preprocessor/Variadic/variadic_must_be_last.dm index f190d3019d..58350ff1d4 100644 --- a/Content.Tests/DMProject/Tests/Preprocessor/Variadic/variadic_must_be_last.dm +++ b/Content.Tests/DMProject/Tests/Preprocessor/Variadic/variadic_must_be_last.dm @@ -1,4 +1,4 @@ -//COMPILE ERROR OD0010 +// COMPILE ERROR OD0010 #define DAMN(what...,the...,hockeysticks...) world << list(##what) diff --git a/Content.Tests/DMProject/Tests/Preprocessor/macro_newline_var.dm b/Content.Tests/DMProject/Tests/Preprocessor/macro_newline_var.dm index 4aa1d76373..4f98461a18 100644 --- a/Content.Tests/DMProject/Tests/Preprocessor/macro_newline_var.dm +++ b/Content.Tests/DMProject/Tests/Preprocessor/macro_newline_var.dm @@ -1,4 +1,5 @@ /datum/var/name +/datum/var/icon_state #define DEFINE_FLOORS(_PATH, _VARS) \ /datum/simulated/floor/_PATH{_VARS};\ diff --git a/Content.Tests/DMProject/Tests/Savefile/BasicReadAndWrite.dm b/Content.Tests/DMProject/Tests/Savefile/BasicReadAndWrite.dm index 143a84a3c6..476ed78733 100644 --- a/Content.Tests/DMProject/Tests/Savefile/BasicReadAndWrite.dm +++ b/Content.Tests/DMProject/Tests/Savefile/BasicReadAndWrite.dm @@ -33,7 +33,8 @@ ASSERT(S["pie2"] ~= assoc) // Shouldn't evaluate CRASH - S2?["ABC"] << CRASH("rhs should not evaluate due to null-conditional") + //NB: using = rather than << here because << *does* evaluate the RHS regardless of the nullness of the LHS + S2?["ABC"] = CRASH("rhs should not evaluate due to null-conditional") // Test EOF S.cd = "DEF" diff --git a/Content.Tests/DMProject/Tests/Savefile/ExportText.dm b/Content.Tests/DMProject/Tests/Savefile/ExportText.dm index 7ecb792a14..e86182faba 100644 --- a/Content.Tests/DMProject/Tests/Savefile/ExportText.dm +++ b/Content.Tests/DMProject/Tests/Savefile/ExportText.dm @@ -24,7 +24,10 @@ F["dirIcon"] = new /icon() F["list"] << list("1",2,"three"=3,4, new /datum(), new /datum(), list(1,2,3, new /datum())) - ASSERT(F.dir ~= list("dir","dir2","dir3","dir4","dir5","dir6","dir7","dirIcon","list")) + var/list/match = list("dir","dir2","dir3","dir4","dir5","dir6","dir7","dirIcon","list") + ASSERT(length(F.dir) == length(match)) + for(var/d in F.dir) + ASSERT(d in match) ASSERT(F.ExportText("dir6/subdir6") == ". = 321\n") ASSERT(F.ExportText("dir6/subdir6/") == ". = 321\n") ASSERT(F.ExportText("dir6") == "\nsubdir6 = 321\n") diff --git a/Content.Tests/DMProject/Tests/SpecialProcs/initial/InitialVarOnPrimitivePragma.dm b/Content.Tests/DMProject/Tests/SpecialProcs/initial/InitialVarOnPrimitivePragma.dm index f98a6fbe6f..64ebee7966 100644 --- a/Content.Tests/DMProject/Tests/SpecialProcs/initial/InitialVarOnPrimitivePragma.dm +++ b/Content.Tests/DMProject/Tests/SpecialProcs/initial/InitialVarOnPrimitivePragma.dm @@ -1,4 +1,5 @@ // RUNTIME ERROR +// NOBYOND #pragma InitialVarOnPrimitiveException error /proc/initial_test(obj/A) diff --git a/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_blocks.dm b/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_blocks.dm index 890b92670e..f1a1a83c9b 100644 --- a/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_blocks.dm +++ b/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_blocks.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD3100 +// NOBYOND //Test that our pragma for this is working. #pragma EmptyBlock error /proc/RunTest() diff --git a/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_proc.dm b/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_proc.dm index 3dd69a0d6f..b0e00dcc02 100644 --- a/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_proc.dm +++ b/Content.Tests/DMProject/Tests/Statements/ControlFlow/empty_proc.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD3101 +// NOBYOND //Test that our pragma for this is working. #pragma EmptyProc error diff --git a/Content.Tests/DMProject/Tests/Statements/EmptyBlockSuppressed.dm b/Content.Tests/DMProject/Tests/Statements/EmptyBlockSuppressed.dm index d4b6a36777..88df216be5 100644 --- a/Content.Tests/DMProject/Tests/Statements/EmptyBlockSuppressed.dm +++ b/Content.Tests/DMProject/Tests/Statements/EmptyBlockSuppressed.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma EmptyBlock error /proc/RunTest() diff --git a/Content.Tests/DMProject/Tests/Statements/Switch/no_cases.dm b/Content.Tests/DMProject/Tests/Statements/Switch/no_cases.dm index 1b40cfd665..be93de02a4 100644 --- a/Content.Tests/DMProject/Tests/Statements/Switch/no_cases.dm +++ b/Content.Tests/DMProject/Tests/Statements/Switch/no_cases.dm @@ -1,3 +1,4 @@ // COMPILE ERROR OD0015 +// NOBYOND /proc/RunTest() switch(1) \ No newline at end of file diff --git a/Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause_pragma.dm b/Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause_pragma.dm index 81403acf6a..56da331e1c 100644 --- a/Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause_pragma.dm +++ b/Content.Tests/DMProject/Tests/Statements/Switch/weird_when_clause_pragma.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD3201 +// NOBYOND //test to make sure SuspiciousSwitchCase is working #pragma SuspiciousSwitchCase error diff --git a/Content.Tests/DMProject/Tests/Text/UnicodeProcs.dm b/Content.Tests/DMProject/Tests/Text/UnicodeProcs.dm index dd4ca44385..f696be8e54 100644 --- a/Content.Tests/DMProject/Tests/Text/UnicodeProcs.dm +++ b/Content.Tests/DMProject/Tests/Text/UnicodeProcs.dm @@ -1,3 +1,4 @@ +// NOBYOND - unicode memes /proc/RunTest() ASSERT(length("😀") == 2) ASSERT(length_char("😀") == 1) diff --git a/Content.Tests/DMProject/BrokenTests/Tree/Global/StaticScope/no_objproc_in_static.dm b/Content.Tests/DMProject/Tests/Tree/Global/StaticScope/no_objproc_in_static.dm similarity index 73% rename from Content.Tests/DMProject/BrokenTests/Tree/Global/StaticScope/no_objproc_in_static.dm rename to Content.Tests/DMProject/Tests/Tree/Global/StaticScope/no_objproc_in_static.dm index 0cfbdae0d9..6a3faa7a95 100644 --- a/Content.Tests/DMProject/BrokenTests/Tree/Global/StaticScope/no_objproc_in_static.dm +++ b/Content.Tests/DMProject/Tests/Tree/Global/StaticScope/no_objproc_in_static.dm @@ -1,4 +1,4 @@ -// RUNTIME ERROR +// COMPILE ERROR OD0404 /var/outer1 = "A" @@ -24,7 +24,7 @@ proc/test_inner1() return 3 proc/test_inner2() - var/static/inner2 = test_outer2() + var/static/inner2 = test_outer2() //because this is static and trying to act on an instance proc return inner2 verb/test() diff --git a/Content.Tests/DMProject/Tests/Tree/Global/Var/global_reference.dm b/Content.Tests/DMProject/Tests/Tree/Global/Var/global_reference.dm index a9ec3e5fd8..75c3f81c09 100644 --- a/Content.Tests/DMProject/Tests/Tree/Global/Var/global_reference.dm +++ b/Content.Tests/DMProject/Tests/Tree/Global/Var/global_reference.dm @@ -1,4 +1,5 @@ // COMPILE ERROR OD0011 +// NOBYOND /proc/RunTest() var/list/L = list() diff --git a/Content.Tests/DMProject/Tests/Tree/type_duplicate_proc.dm b/Content.Tests/DMProject/Tests/Tree/type_duplicate_proc.dm index a6894f77da..7147135171 100644 --- a/Content.Tests/DMProject/Tests/Tree/type_duplicate_proc.dm +++ b/Content.Tests/DMProject/Tests/Tree/type_duplicate_proc.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD2101 +// NOBYOND #pragma DuplicateProcDefinition error //Issue OD#933: https://github.com/OpenDreamProject/OpenDream/issues/933 diff --git a/Content.Tests/DMProject/Tests/Typemaker/arg_fail.dm b/Content.Tests/DMProject/Tests/Typemaker/arg_fail.dm index 76d297e790..135b9a5f71 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/arg_fail.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/arg_fail.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD2701 +// NOBYOND #pragma InvalidReturnType error /proc/meep(var/foo = "bar" as text) as num return foo diff --git a/Content.Tests/DMProject/Tests/Typemaker/arg_implicit_null2.dm b/Content.Tests/DMProject/Tests/Typemaker/arg_implicit_null2.dm index 46c609064c..5ec18361e6 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/arg_implicit_null2.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/arg_implicit_null2.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma ImplicitNullType error /proc/do(mob/user as mob) // Only error if the arg is not a subtype of datum/ return diff --git a/Content.Tests/DMProject/Tests/Typemaker/arg_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/arg_pass.dm index 4d13398fff..b4c09fc2d5 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/arg_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/arg_pass.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /proc/meep(var/foo = "bar" as text) as text return foo diff --git a/Content.Tests/DMProject/Tests/Typemaker/global_proccall_error.dm b/Content.Tests/DMProject/Tests/Typemaker/global_proccall_error.dm index 6ffbef23da..9693788cbc 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/global_proccall_error.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/global_proccall_error.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD2701 +// NOBYOND #pragma InvalidReturnType error /proc/foo() return "bar" diff --git a/Content.Tests/DMProject/Tests/Typemaker/global_proccall_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/global_proccall_pass.dm index 9c8617364c..6471c25c25 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/global_proccall_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/global_proccall_pass.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /proc/foo() as text return "bar" diff --git a/Content.Tests/DMProject/Tests/Typemaker/newpath_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/newpath_pass.dm index bb6f9d480f..b297bbfee6 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/newpath_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/newpath_pass.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidVarType error /proc/foo(obj/bar as obj) bar = new /obj(null) diff --git a/Content.Tests/DMProject/Tests/Typemaker/proc_deref.dm b/Content.Tests/DMProject/Tests/Typemaker/proc_deref.dm index f370d135fc..5c3c4c4d36 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proc_deref.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proc_deref.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /datum/proc/foo() as num return 5 diff --git a/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass.dm index 9fc5428936..b17ef25ddf 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass.dm @@ -1,4 +1,4 @@ - +// NOBYOND #pragma InvalidReturnType error /datum/proc/foo() as num var/const/meep = 5 diff --git a/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass2.dm b/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass2.dm index 8d8936a984..f2a2432e76 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass2.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proc_local_pass2.dm @@ -1,4 +1,4 @@ - +// NOBYOND #pragma InvalidReturnType error /datum/proc/foo() as num var/meep = 5 as num diff --git a/Content.Tests/DMProject/Tests/Typemaker/proc_path_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/proc_path_pass.dm index 077c1a671b..f19facc90a 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proc_path_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proc_path_pass.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /datum/foo /datum/proc/meep() as /datum/foo diff --git a/Content.Tests/DMProject/Tests/Typemaker/proc_path_subtype.dm b/Content.Tests/DMProject/Tests/Typemaker/proc_path_subtype.dm index 2b12ee8f45..92c62d164e 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proc_path_subtype.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proc_path_subtype.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /datum/foo /datum/proc/meep() as /datum diff --git a/Content.Tests/DMProject/Tests/Typemaker/proc_return_type.dm b/Content.Tests/DMProject/Tests/Typemaker/proc_return_type.dm index f6b5d5e2db..73e9142ab8 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proc_return_type.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proc_return_type.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /datum/proc/foo() as num return 5 diff --git a/Content.Tests/DMProject/Tests/Typemaker/proccall_error.dm b/Content.Tests/DMProject/Tests/Typemaker/proccall_error.dm index 68cbeec491..95de53439c 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proccall_error.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proccall_error.dm @@ -1,4 +1,5 @@ //COMPILE ERROR OD2701 +// NOBYOND #pragma InvalidReturnType error /datum/proc/foo() return "bar" diff --git a/Content.Tests/DMProject/Tests/Typemaker/proccall_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/proccall_pass.dm index 779f441448..daa32133fe 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/proccall_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/proccall_pass.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /datum/proc/foo() as text return "bar" diff --git a/Content.Tests/DMProject/Tests/Typemaker/return_objvar_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/return_objvar_pass.dm index b028eefac8..381f287561 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/return_objvar_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/return_objvar_pass.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidReturnType error /datum/var/bar = "foobar" as text diff --git a/Content.Tests/DMProject/Tests/Typemaker/var_override_pass.dm b/Content.Tests/DMProject/Tests/Typemaker/var_override_pass.dm index 596b2d9141..e39c883fe4 100644 --- a/Content.Tests/DMProject/Tests/Typemaker/var_override_pass.dm +++ b/Content.Tests/DMProject/Tests/Typemaker/var_override_pass.dm @@ -1,3 +1,4 @@ +// NOBYOND #pragma InvalidVarType error /datum/do/re/mi/fa/so meep = null diff --git a/Content.Tests/DMProject/environment.dme b/Content.Tests/DMProject/environment.dme index 4aba6808f5..43360d5a6f 100644 --- a/Content.Tests/DMProject/environment.dme +++ b/Content.Tests/DMProject/environment.dme @@ -1,11 +1,11 @@ -// BEGIN_INTERNALS -// END_INTERNALS -// BEGIN_FILE_DIR #define FILE_DIR . -// END_FILE_DIR -// BEGIN_PREFERENCES -// END_PREFERENCES -// BEGIN_INCLUDE +#define DEBUG + #include "interface.dmf" -#include "map.dmm" -// END_INCLUDE + +/world/New() + spawn(300) + Del() // just in case + world.log = file("errors.log") + RunTest() + Del() \ No newline at end of file