-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into appearance_name_d…
…esc_copying
- Loading branch information
Showing
38 changed files
with
431 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Content.IntegrationTests/DMProject/Tests/filter_initial.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/obj/blurry | ||
filters = filter(type="blur", size=2) | ||
|
||
/obj/veryblurry | ||
filters = list(type="blur", size=4) | ||
|
||
/obj/notatallblurry | ||
filters = list() | ||
|
||
/proc/test_filter_init() | ||
var/obj/veryblurry/VB = new() | ||
ASSERT(length(VB.filters) == 1) | ||
var/obj/blurry/B = new() | ||
ASSERT(length(B.filters) == 1) | ||
var/obj/notatallblurry/NAB = new() | ||
ASSERT(length(NAB.filters) == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
Content.Tests/DMProject/Broken Tests/Expression/proccall_keyword_param.dm
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
Content.Tests/DMProject/Broken Tests/Procs/Arglist/initial.dm
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
|
||
|
||
/datum/test/var/bar = "foobar" | ||
/datum/test | ||
/proc/RunTest() | ||
var/datum/test/D = __IMPLIED_TYPE__ | ||
ASSERT(D.bar == "foobar") | ||
ASSERT(D == /datum/test) | ||
D = ArgumentTest(__IMPLIED_TYPE__) | ||
|
||
/proc/ArgumentTest(some_argument) | ||
ASSERT(some_argument == /datum/test) |
11 changes: 11 additions & 0 deletions
11
Content.Tests/DMProject/Tests/Expression/proccall_keyword_param.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
//# issue 655 | ||
//# issue 265 | ||
|
||
/datum/proc/nullproc(null, temp) | ||
ASSERT(isnull(null)) | ||
ASSERT(temp == 2) | ||
|
||
/proc/RunTest() | ||
var/datum/D = new | ||
D.nullproc(1,2) |
2 changes: 1 addition & 1 deletion
2
...MProject/Broken Tests/List/ListNullArg.dm → ...Tests/DMProject/Tests/List/ListNullArg.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// RUNTIME ERROR | ||
|
||
/proc/ListNullArg2(a[5][3]) | ||
ASSERT(a[1].len == 3) | ||
ASSERT(a[1].len == 3) // a should be null | ||
|
||
/proc/RunTest() | ||
ListNullArg2() |
2 changes: 1 addition & 1 deletion
2
...Project/Broken Tests/List/ListNullArg1.dm → ...ests/DMProject/Tests/List/ListNullArg1.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// RUNTIME ERROR | ||
|
||
/proc/ListNullArg1(a[5]) | ||
ASSERT(a.len == 5) | ||
ASSERT(a.len == 5) // a should be null | ||
|
||
/proc/RunTest() | ||
ListNullArg1() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
/proc/_initial(...) | ||
ASSERT(initial(arglist(args))[1] == "foo") | ||
|
||
/proc/RunTest() | ||
_initial("foo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var/models = "/obj/cable/brown{\n\ticon_state = \"2-8\"\n\t},\n/obj/cable/brown{\n\ticon_state = \"4-8\"\n\t},\n/turf/simulated/floor/orangeblack,\n/area/station/devzone" | ||
var/result_match = "/obj/cable/brown{\n\ticon_state = \"1\"\n\t},\n/obj/cable/brown{\n\ticon_state = \"2\"\n\t},\n/turf/simulated/floor/orangeblack,\n/area/station/devzone" | ||
|
||
/proc/RunTest() | ||
var/list/originalStrings = list() | ||
var/regex/noStrings = regex(@{"(["])(?:(?=(\\?))\2(.|\n))*?\1"}) | ||
var/stringIndex = 1 | ||
var/found | ||
do | ||
found = noStrings.Find(models, noStrings.next) | ||
if(found) | ||
var indexText = {""[stringIndex]""} | ||
stringIndex++ | ||
var match = copytext(noStrings.match, 2, -1) // Strip quotes | ||
models = noStrings.Replace(models, indexText, found) | ||
originalStrings[indexText] = (match) | ||
while(found) | ||
ASSERT(models == result_match) | ||
ASSERT(originalStrings ~= list("\"1\"" = "2-8", "\"2\"" = "4-8")) | ||
ASSERT(stringIndex == 3) |
2 changes: 1 addition & 1 deletion
2
... Tests/Statements/For/reuse_decl_const.dm → .../Tests/Statements/For/reuse_decl_const.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// COMPILE ERROR | ||
// COMPILE ERROR OD0501 | ||
|
||
/datum | ||
var/const/idx = 0 | ||
|
18 changes: 18 additions & 0 deletions
18
Content.Tests/DMProject/Tests/Statements/For/reuse_decl_const2.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// COMPILE ERROR OD0501 | ||
|
||
/datum | ||
var/const/idx = 0 | ||
var/c = 0 | ||
proc/do_loop() | ||
for (idx in list(1,2,3)) | ||
c += idx | ||
|
||
/proc/RunTest() | ||
var/datum/d = new | ||
d.do_loop() | ||
|
||
var/const/idx = 0 | ||
var/c = 0 | ||
for (idx in list(1,2,3)) | ||
c += idx | ||
|
6 changes: 6 additions & 0 deletions
6
Content.Tests/DMProject/Tests/Statements/extra_token_pragma.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// COMPILE ERROR OD3205 | ||
#pragma ExtraToken error | ||
|
||
/proc/RunTest() | ||
if(1). | ||
ASSERT(TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,7 @@ | |
ASSERT(TRUE) | ||
else | ||
ASSERT(FALSE) | ||
for(var/i in 1 to 1): | ||
ASSERT(TRUE) | ||
for(var/i in 1 to 1). | ||
ASSERT(TRUE) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.