-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvistest.cpp
39 lines (30 loc) · 1.24 KB
/
vistest.cpp
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
#include <sciter-x.h>
typedef std::pair<sciter::value, sciter::value> json_value_pair;
extern json_value_pair __visualize_json_value_pair = {};
int test() {
sciter::value jempty;
sciter::value jnull = sciter::value::null();
sciter::value jbool(true);
sciter::value jint(1);
sciter::value jfloat(3.5);
sciter::value jstring(L"string value");
sciter::value jsymbol = sciter::value::symbol(aux::chars_of(L"symbol value"));
sciter::value jerrro = sciter::value::make_error(L"error value");
sciter::value jsecure = sciter::value::secure_string(L"secured value", 13);
sciter::value jbytes(aux::bytes((unsigned char*)"bytes", 5));
sciter::value jcolor = sciter::value::color(0x00FF0000);
sciter::value jduration = sciter::value::duration(10);
sciter::value jangle = sciter::value::angle(90);
sciter::value jcurrency = sciter::value::currency(1);
sciter::value jarray = sciter::value::make_array(7);
jarray[0] = jint;
jarray[1] = jfloat;
jarray[2] = jstring;
sciter::value jmap = sciter::value::make_map();
jmap[L"one"] = 1;
jmap[L"two"] = 2;
jmap[L"s"] = jstring;
sciter::value(*pf)() = []() { return sciter::value(false); };
sciter::value jfunc = sciter::vfunc(pf);
return 0;
}