Skip to content

Commit 14a7742

Browse files
jbezairejhunsaker
authored andcommitted
add test cases
1 parent 34eda6d commit 14a7742

File tree

10 files changed

+136
-0
lines changed

10 files changed

+136
-0
lines changed

pyth/tests/qset/35.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"exponent": -8,
3+
"quotes": [
4+
{
5+
"price": 4000000000000,
6+
"conf": 1000000000
7+
},
8+
{
9+
"price": 4000100000000,
10+
"conf": 1000000000
11+
},
12+
{
13+
"price": 4000200000000,
14+
"conf": 1000000000
15+
},
16+
{
17+
"price": 4000300000000,
18+
"conf": 1000000000
19+
},
20+
{
21+
"price": 4000400000000,
22+
"conf": 1000000000
23+
},
24+
{
25+
"price": 40000000000,
26+
"conf": 10000000
27+
},
28+
{
29+
"price": 40000000000,
30+
"conf": 10000000
31+
}
32+
]
33+
}

pyth/tests/qset/35.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"exponent":-8,"price":40000000000,"conf":1698517500000,"status":"trading"}

pyth/tests/qset/36.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"exponent": -8,
3+
"quotes": [
4+
{
5+
"price": 1000000000,
6+
"conf": 1000000
7+
},
8+
{
9+
"price": 1001000000,
10+
"conf": 1000000
11+
},
12+
{
13+
"price": 1002000000,
14+
"conf": 1000000
15+
},
16+
{
17+
"price": 50000000000,
18+
"conf": 49000000000
19+
},
20+
{
21+
"price": 30000000000,
22+
"conf": 29000000000
23+
},
24+
{
25+
"price": 40000000000,
26+
"conf": 39010000000
27+
},
28+
{
29+
"price": 101500000000,
30+
"conf": 100510000000
31+
}
32+
]
33+
}

pyth/tests/qset/36.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"exponent":-8,"price":1001000060,"conf":1000000,"status":"trading"}

pyth/tests/qset/37.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"exponent": -8,
3+
"quotes": [
4+
{
5+
"price": 4000000000000,
6+
"conf": 1000000000
7+
},
8+
{
9+
"price": 4000100000000,
10+
"conf": 1000000000
11+
},
12+
{
13+
"price": 4000200000000,
14+
"conf": 1000000000
15+
},
16+
{
17+
"price": 4000300000000,
18+
"conf": 1000000000
19+
},
20+
{
21+
"price": 4000400000000,
22+
"conf": 1000000000
23+
},
24+
{
25+
"price": 400000000000000,
26+
"conf": 10000
27+
},
28+
{
29+
"price": 400000000000000,
30+
"conf": 10000
31+
}
32+
]
33+
}

pyth/tests/qset/37.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"exponent":-8,"price":400000000000000,"conf":169854770000000,"status":"trading"}

pyth/tests/qset/38.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"comment": "zero confidence quotes are rejected. With no valid quotes result should be status unknown",
3+
"exponent": -3,
4+
"quotes": [
5+
{
6+
"price": 10000,
7+
"conf": 0
8+
},
9+
{
10+
"price": 10000,
11+
"conf": 0
12+
},
13+
{
14+
"price": 10000,
15+
"conf": 0
16+
}
17+
]
18+
}

pyth/tests/qset/38.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"exponent":-3,"price":0,"conf":0,"status":"unknown"}

pyth/tests/qset/39.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"comment": "1 good quote, 1 off by factor of 10 - this is the low quote number, tightest outlier limit."
3+
"exponent": -8,
4+
"quotes": [
5+
{
6+
"price": 21000000,
7+
"conf": 100000
8+
},
9+
{
10+
"price": 209900000,
11+
"conf": 1000000
12+
}
13+
]
14+
}

pyth/tests/qset/39.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"exponent":-8,"price":115225655,"conf":94337828,"status":"trading"}

0 commit comments

Comments
 (0)