summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-10-01 21:57:34 -0400
committergumi <git@gumi.ca>2018-10-01 21:57:34 -0400
commit55f666602680b10ab0a3966de96d50c088e58865 (patch)
tree83344b1b0c1a6f3a0c5b6677cf87913e50081293 /npc
parentb71f15256feed9aeadee06b712464594be9addbf (diff)
downloadhercules-55f666602680b10ab0a3966de96d50c088e58865.tar.gz
hercules-55f666602680b10ab0a3966de96d50c088e58865.tar.bz2
hercules-55f666602680b10ab0a3966de96d50c088e58865.tar.xz
hercules-55f666602680b10ab0a3966de96d50c088e58865.zip
add more unit tests for getd
Diffstat (limited to 'npc')
-rw-r--r--npc/dev/test.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index bdbc52ed4..c2f07ab2f 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -651,6 +651,12 @@ function script HerculesSelfTestHelper {
setd(".@x", getd(".@y"));
callsub(OnCheck, "setd getd", .@x, .@y);
+ // getd types
+ callsub(OnCheck, "Getdatatype (getd: param)", getdatatype(getd("Hp")), DATATYPE_INT | DATATYPE_PARAM);
+ callsub(OnCheck, "Getdatatype (getd: const)", getdatatype(getd("DATATYPE_CONST")), DATATYPE_INT | DATATYPE_CONST);
+ callsub(OnCheck, "Getdatatype (getd: numeric var)", getdatatype(getd(".@foo")), DATATYPE_INT | DATATYPE_VAR);
+ callsub(OnCheck, "Getdatatype (getd: string var)", getdatatype(getd(".@foo$")), DATATYPE_STR | DATATYPE_VAR);
+
// getvariableofnpc
.x = 2;
set getvariableofnpc(.x, "TestVarOfAnotherNPC"), 1;