This repository was archived by the owner on Jul 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtesting.pwn
More file actions
47 lines (35 loc) · 1.31 KB
/
testing.pwn
File metadata and controls
47 lines (35 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "zipline.inc"
#define RUN_TESTS
#include <YSI\y_testing>
Test:Zipline() {
new ziplineid = CreateZipline(-9.2563, 54.6999, 11.1468, 8.9720, 15.1808, 6.7617, 1, 2);
ASSERT(IsValidZipline(ziplineid));
ASSERT(IsValidDynamicArea(GetZiplineStartAreaID(ziplineid)) == 1);
ASSERT(IsValidDynamicArea(GetZiplineEndAreaID(ziplineid)) == 1);
ASSERT(IsValidLineSegment(GetZiplineLineID(ziplineid)));
new Float:x, Float:y, Float:z;
GetZiplineStartPos(ziplineid, x, y, z);
ASSERT(x == -9.2563 && y == 54.6999 && z == 11.1468);
SetZiplineStartPos(ziplineid, -9.1, 54.1, 11.1);
GetZiplineStartPos(ziplineid, x, y, z);
ASSERT(x == -9.1 && y == 54.1 && z == 11.1);
GetZiplineEndPos(ziplineid, x, y, z);
ASSERT(x == 8.9720 && y == 15.1808 && z == 6.7617);
SetZiplineEndPos(ziplineid, 8.1, 15.1, 6.1);
GetZiplineEndPos(ziplineid, x, y, z);
ASSERT(x == 8.1 && y == 15.1 && z == 6.1);
ASSERT(GetZiplineWorld(ziplineid) == 1);
SetZiplineWorld(ziplineid, 5);
ASSERT(GetZiplineWorld(ziplineid) == 5);
ASSERT(GetZiplineInterior(ziplineid) == 2);
SetZiplineInterior(ziplineid, 10);
ASSERT(GetZiplineInterior(ziplineid) == 10);
/*
Can't really be tested properly
GetZiplineVector(ziplineid, x, y, z);
IsPlayerOnZipline(playerid);
GetPlayerZipline(playerid);
*/
DestroyZipline(ziplineid);
ASSERT(!IsValidZipline(ziplineid));
}