-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dumptypes
- Loading branch information
Showing
230 changed files
with
3,629 additions
and
1,411 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
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
10 changes: 10 additions & 0 deletions
10
Content.IntegrationTests/DMProject/Tests/atom_appearance.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,10 @@ | ||
/obj/thingtocopy | ||
name = "hello" | ||
desc = "this is a thing" | ||
|
||
/proc/test_appearance() | ||
var/obj/thingtocopy/T = new() | ||
var/obj/otherthing = new() | ||
otherthing.appearance = T.appearance | ||
ASSERT(otherthing.name == T.name) | ||
ASSERT(otherthing.desc == T.desc) |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,6 @@ | |
out += dir | ||
ASSERT(out == 14) | ||
|
||
/proc/RunTest() | ||
/proc/test_nonlocal_var() | ||
var/mob/m = new | ||
m.dodir() |
13 changes: 13 additions & 0 deletions
13
Content.IntegrationTests/DMProject/Tests/string_interpolation.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,13 @@ | ||
/obj/blombo | ||
name = "Blombo" | ||
gender = FEMALE | ||
|
||
/obj/blorpo | ||
name = "Blorpo" | ||
gender = MALE | ||
|
||
/proc/test_string_interpolation() | ||
var/obj/blombo/b = new | ||
var/obj/blorpo/b2 = new | ||
var/result_text = "[b]? Nobody likes \him. \He is awful! Unlike [b2]. \He is pretty cool!" | ||
ASSERT(result_text == "Blombo? Nobody likes her. She is awful! Unlike Blorpo. He is pretty cool!") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
#include "code.dm" | ||
#include "Tests/atom_appearance.dm" | ||
#include "Tests/block.dm" | ||
#include "Tests/color_matrix.dm" | ||
#include "Tests/range.dm" | ||
#include "Tests/verb_duplicate.dm" | ||
#include "Tests/nonlocal_var.dm" | ||
#include "Tests/image.dm" | ||
#include "Tests/filter_initial.dm" | ||
#include "Tests/string_interpolation.dm" | ||
#include "map.dmm" | ||
#include "interface.dmf" |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...en Tests/Tree/Const/Div_Zero/div_zero1.dm → ...kenTests/Tree/Const/Div_Zero/div_zero1.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 OD0011 | ||
|
||
var/a = 1 / 0 | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...en Tests/Tree/Const/Div_Zero/div_zero3.dm → ...kenTests/Tree/Const/Div_Zero/div_zero3.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 OD0011 | ||
|
||
var/static/a = 1 / 0 | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...en Tests/Tree/Const/Div_Zero/div_zero4.dm → ...kenTests/Tree/Const/Div_Zero/div_zero4.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 OD0011 | ||
|
||
/proc/one() | ||
return 1 | ||
|
2 changes: 1 addition & 1 deletion
2
...en Tests/Tree/Const/Div_Zero/div_zero6.dm → ...kenTests/Tree/Const/Div_Zero/div_zero6.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 OD0011 | ||
|
||
var/const/a = 0 | ||
var/b = 1 / a | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
//# issue 380 | ||
|
||
/proc/RunTest() | ||
var/a = @(ZZZ) | ||
asdfZZZ | ||
ASSERT(a == "asdf") |
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,7 @@ | ||
|
||
//# issue 380 | ||
|
||
/proc/RunTest() | ||
var/a = @(ZZQ) | ||
asdfZZQ | ||
ASSERT(a == "asdf") |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/proc/RunTest() | ||
var/L1 = list(1, 2) | ||
L1 += L1 | ||
ASSERT(L1 ~= list(1, 2, 1, 2)) | ||
|
||
var/L2 = list(a=1, b=2) | ||
L2 += L2 | ||
ASSERT(L2 ~= list(a=1, b=2, "a", "b")) |
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
130 changes: 130 additions & 0 deletions
130
Content.Tests/DMProject/Tests/Operators/valid_and_null.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,130 @@ | ||
//simple test of all basic operators with valid and C(null) arguments | ||
//We can't be having const folding in here | ||
#define C(X) pick(X) | ||
/proc/RunTest() | ||
var/a = C(2) | ||
ASSERT(!C(null) == C(1)) | ||
ASSERT(!!C(null) == C(0)) | ||
|
||
ASSERT(~C(1) == 16777214) | ||
ASSERT(~C(0) == 16777215) | ||
ASSERT(~C(null) == 16777215) | ||
|
||
ASSERT(C(1) + C(1) == C(2)) | ||
ASSERT(C(null) + C(1) == C(1)) | ||
ASSERT(C(1) + C(null) == C(1)) | ||
|
||
ASSERT(C(1) - C(1) == C(0)) | ||
ASSERT(C(null) - C(1) == C(-1)) | ||
ASSERT(C(1) - C(null) == C(1)) | ||
|
||
a = C(2) | ||
ASSERT(-a == C(-2)) | ||
a = C(null) | ||
ASSERT(-a == C(0)) | ||
|
||
a = C(1) | ||
ASSERT(a++ == C(1)) | ||
ASSERT(a == C(2)) | ||
ASSERT(++a == C(3)) | ||
ASSERT(a == C(3)) | ||
|
||
ASSERT(a-- == C(3)) | ||
ASSERT(a == C(2)) | ||
ASSERT(--a == C(1)) | ||
ASSERT(a == C(1)) | ||
|
||
a = C(null) | ||
ASSERT(a-- == C(null)) | ||
ASSERT(a == C(-1)) | ||
a = C(null) | ||
ASSERT(--a == C(-1)) | ||
ASSERT(a == C(-1)) | ||
a = C(null) | ||
ASSERT(a++ == C(null)) | ||
ASSERT(a == C(1)) | ||
a = C(null) | ||
ASSERT(++a == C(1)) | ||
ASSERT(a == C(1)) | ||
|
||
ASSERT(C(2) ** C(3) == 8) | ||
ASSERT(C(2) ** C(null) == C(1)) | ||
ASSERT(C(null) ** C(2) == C(0)) | ||
|
||
ASSERT(C(2) * C(3) == 6) | ||
ASSERT(C(2) * C(null) == C(0)) | ||
ASSERT(C(null) * C(2) == C(0)) | ||
|
||
ASSERT(C(4) / C(2) == C(2)) | ||
ASSERT(C(null) / C(2) == C(0)) | ||
ASSERT(C(2) / C(null) == C(2)) | ||
ASSERT(C(null) / C(null) == C(0)) | ||
|
||
ASSERT(C(4) % C(3) == C(1)) | ||
ASSERT(C(null) % C(3) == C(0)) | ||
//ASSERT(C(4) % C(null) == div by zero) | ||
|
||
ASSERT(C(1) < C(1) == C(0)) | ||
ASSERT(C(null) < C(1) == C(1)) | ||
ASSERT(C(1) < C(null) == C(0)) | ||
|
||
ASSERT(C(1) <= C(1) == C(1)) | ||
ASSERT(C(null) <= C(1) == C(1)) | ||
ASSERT(C(1) <= C(null) == C(0)) | ||
|
||
ASSERT(C(1) > C(1) == C(0)) | ||
ASSERT(C(null) > C(1) == C(0)) | ||
ASSERT(C(1) > C(null) == C(1)) | ||
|
||
ASSERT(C(1) >= C(1) == C(1)) | ||
ASSERT(C(null) >= C(1) == C(0)) | ||
ASSERT(C(1) >= C(null) == C(1)) | ||
|
||
ASSERT(C(1) << C(1) == C(2)) | ||
ASSERT(C(null) << C(1) == C(0)) | ||
ASSERT(C(1) << C(null) == C(1)) | ||
|
||
ASSERT(C(1) >> C(1) == C(0)) | ||
ASSERT(C(null) >> C(1) == C(0)) | ||
ASSERT(C(1) >> C(null) == C(1)) | ||
|
||
ASSERT((C(1) == C(1)) == C(1)) | ||
ASSERT((C(null) == C(null)) == C(1)) | ||
ASSERT((C(null) == C(0)) == C(0)) | ||
|
||
ASSERT((C(1) != C(null)) == C(1)) | ||
ASSERT((C(null) != C(1)) == C(1)) | ||
ASSERT((C(null) != C(0)) == C(1)) | ||
|
||
ASSERT((C(1) <> C(null)) == C(1)) | ||
ASSERT((C(null) <> C(1)) == C(1)) | ||
ASSERT((C(null) <> C(0)) == C(1)) | ||
|
||
ASSERT((C(1) ~= C(1)) == C(1)) | ||
ASSERT((C(null) ~= C(null)) == C(1)) | ||
ASSERT((C(null) ~= C(0)) == C(0)) | ||
|
||
ASSERT((C(1) ~! C(1)) == C(0)) | ||
ASSERT((C(null) ~! C(null)) == C(0)) | ||
ASSERT((C(null) ~! C(0)) == C(1)) | ||
|
||
ASSERT((C(1) & C(1)) == C(1)) | ||
ASSERT((C(null) & C(1)) == C(0)) | ||
ASSERT((C(1) & C(null)) == C(0)) | ||
|
||
ASSERT((C(1) ^ C(1)) == C(0)) | ||
ASSERT((C(null) ^ C(5)) == C(5)) | ||
ASSERT((C(5) ^ C(null)) == C(5)) | ||
|
||
ASSERT((C(1) | C(1)) == C(1)) | ||
ASSERT((C(null) | C(1)) == C(1)) | ||
ASSERT((C(1) | C(null)) == C(1)) | ||
|
||
ASSERT((C(1) && C(1)) == C(1)) | ||
ASSERT((C(null) && C(1)) == C(null)) | ||
ASSERT((C(1) && C(null)) == C(null)) | ||
|
||
ASSERT((C(1) || C(1)) == C(1)) | ||
ASSERT((C(null) || C(1)) == C(1)) | ||
ASSERT((C(1) || C(null)) == C(1)) | ||
|
Oops, something went wrong.