aboutsummaryrefslogtreecommitdiffstats
path: root/test-data/ex-2/invalid
diff options
context:
space:
mode:
Diffstat (limited to 'test-data/ex-2/invalid')
-rw-r--r--test-data/ex-2/invalid/ex1-commission-above-90.xml49
-rw-r--r--test-data/ex-2/invalid/ex1-commission-below-0.xml49
-rw-r--r--test-data/ex-2/invalid/ex1-duplicate-event-id.xml49
-rw-r--r--test-data/ex-2/invalid/ex1-not-xml.txt49
-rw-r--r--test-data/ex-2/invalid/ex2-duplicate-user.xml49
-rw-r--r--test-data/ex-2/invalid/ex2-event-two-mms.xml52
-rw-r--r--test-data/ex-2/invalid/ex2-event-without-mm.xml46
-rw-r--r--test-data/ex-2/invalid/ex2-mm-unknown-event.xml52
-rw-r--r--test-data/ex-2/invalid/ex2-negative-initial-cash.xml49
-rw-r--r--test-data/ex-2/invalid/ex2-zero-initial-cash.xml49
10 files changed, 493 insertions, 0 deletions
diff --git a/test-data/ex-2/invalid/ex1-commission-above-90.xml b/test-data/ex-2/invalid/ex1-commission-above-90.xml
new file mode 100644
index 0000000..a94845f
--- /dev/null
+++ b/test-data/ex-2/invalid/ex1-commission-above-90.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex1 check 3: commission must be 0..90. Event 2 charges 91%. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">91</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>100</initial-cash>
47 </GM-user>
48 </GM-users>
49</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex1-commission-below-0.xml b/test-data/ex-2/invalid/ex1-commission-below-0.xml
new file mode 100644
index 0000000..a2433cb
--- /dev/null
+++ b/test-data/ex-2/invalid/ex1-commission-below-0.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex1 check 3: commission must be 0..90. Event 1 charges -1%. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">-1</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>100</initial-cash>
47 </GM-user>
48 </GM-users>
49</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex1-duplicate-event-id.xml b/test-data/ex-2/invalid/ex1-duplicate-event-id.xml
new file mode 100644
index 0000000..5998bb9
--- /dev/null
+++ b/test-data/ex-2/invalid/ex1-duplicate-event-id.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex1 check 2: every event has a unique id. Both events use id 1. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>1</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>100</initial-cash>
47 </GM-user>
48 </GM-users>
49</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex1-not-xml.txt b/test-data/ex-2/invalid/ex1-not-xml.txt
new file mode 100644
index 0000000..488b486
--- /dev/null
+++ b/test-data/ex-2/invalid/ex1-not-xml.txt
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex1 check 1: the file must end with .xml. Content is a valid small.xml; only the extension is wrong. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>100</initial-cash>
47 </GM-user>
48 </GM-users>
49</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex2-duplicate-user.xml b/test-data/ex-2/invalid/ex2-duplicate-user.xml
new file mode 100644
index 0000000..38e8040
--- /dev/null
+++ b/test-data/ex-2/invalid/ex2-duplicate-user.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex2 check 1: every user has a unique name. Two users are named Tikva. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Tikva">
46 <initial-cash>100</initial-cash>
47 </GM-user>
48 </GM-users>
49</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex2-event-two-mms.xml b/test-data/ex-2/invalid/ex2-event-two-mms.xml
new file mode 100644
index 0000000..2a698a2
--- /dev/null
+++ b/test-data/ex-2/invalid/ex2-event-two-mms.xml
@@ -0,0 +1,52 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex2 check 4: every event has exactly one MM. Event 1 has two: Tikva and Menash. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>100</initial-cash>
47 <GM-market-maker>
48 <event id="1"/>
49 </GM-market-maker>
50 </GM-user>
51 </GM-users>
52</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex2-event-without-mm.xml b/test-data/ex-2/invalid/ex2-event-without-mm.xml
new file mode 100644
index 0000000..26d1da6
--- /dev/null
+++ b/test-data/ex-2/invalid/ex2-event-without-mm.xml
@@ -0,0 +1,46 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex2 check 4: every event has exactly one MM. Event 1 has none (Tikva is no longer its MM). -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 </GM-user>
42 <GM-user name="Menash">
43 <initial-cash>100</initial-cash>
44 </GM-user>
45 </GM-users>
46</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex2-mm-unknown-event.xml b/test-data/ex-2/invalid/ex2-mm-unknown-event.xml
new file mode 100644
index 0000000..c0c9316
--- /dev/null
+++ b/test-data/ex-2/invalid/ex2-mm-unknown-event.xml
@@ -0,0 +1,52 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex2 check 3: a market maker may only reference existing events. Menash is MM of event 7, which does not exist. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>100</initial-cash>
47 <GM-market-maker>
48 <event id="7"/>
49 </GM-market-maker>
50 </GM-user>
51 </GM-users>
52</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex2-negative-initial-cash.xml b/test-data/ex-2/invalid/ex2-negative-initial-cash.xml
new file mode 100644
index 0000000..04a4894
--- /dev/null
+++ b/test-data/ex-2/invalid/ex2-negative-initial-cash.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex2 check 2: initial cash must be > 0. Menash starts with -50. -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>-50</initial-cash>
47 </GM-user>
48 </GM-users>
49</Guess-Market>
diff --git a/test-data/ex-2/invalid/ex2-zero-initial-cash.xml b/test-data/ex-2/invalid/ex2-zero-initial-cash.xml
new file mode 100644
index 0000000..b21593e
--- /dev/null
+++ b/test-data/ex-2/invalid/ex2-zero-initial-cash.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Ex2 check 2: initial cash must be > 0. Menash starts with 0 (schema-valid, logically invalid). -->
3<Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd">
4 <GM-events>
5 <GM-event name="Mujtaba is Dead">
6 <id>1</id>
7 <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description>
8 <commission type="on-purchase">5</commission>
9 <GM-options>
10 <GM-option>Hell Yea !</GM-option>
11 <GM-option>No way !</GM-option>
12 </GM-options>
13 <GM-method>
14 <GM-LMSR>
15 <b>100</b>
16 </GM-LMSR>
17 </GM-method>
18 </GM-event>
19 <GM-event name="World Cap Winner">
20 <id>2</id>
21 <description>Who do you think will win the world cap ?</description>
22 <commission type="on-close">15</commission>
23 <GM-options>
24 <GM-option>Argentina</GM-option>
25 <GM-option>Spain</GM-option>
26 </GM-options>
27 <GM-method>
28 <GM-order-book allow-mint="true" initial="100" d="1"/>
29 </GM-method>
30 </GM-event>
31 </GM-events>
32 <GM-users>
33 <GM-user name="Avrum">
34 <initial-cash>1000</initial-cash>
35 <GM-market-maker>
36 <event id="2"/>
37 </GM-market-maker>
38 </GM-user>
39 <GM-user name="Tikva">
40 <initial-cash>10000</initial-cash>
41 <GM-market-maker>
42 <event id="1"/>
43 </GM-market-maker>
44 </GM-user>
45 <GM-user name="Menash">
46 <initial-cash>0</initial-cash>
47 </GM-user>
48 </GM-users>
49</Guess-Market>