-
Notifications
You must be signed in to change notification settings - Fork 1
/
tests.html
57 lines (55 loc) · 2.14 KB
/
tests.html
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
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Winnow Tests</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; font-family: Georgia; }
body { padding: 1rem; }
section { display: flex; flex-flow: row wrap; margin-bottom: 2rem; }
h1, h2, h3 { margin-bottom: 1rem; width: 100%; }
hr { margin-bottom: 1rem; margin-top: 1rem; }
/* compiler tests */
pre { background: #eee; font-family: "Source Code Pro", monospace; padding: 0.5rem; }
pre.winnow { width: 55%; }
pre.felt { margin-left: 1rem; width: calc(45% - 1rem); }
/* sifting tests */
.siftingTest .eventTable, .siftingTest .partialMatches { font-family: "Source Code Pro", monospace; }
.eventTable { width: 22%; margin-right: 3%; }
.eventTable tbody td { white-space: pre; }
.eventTable tr.selected { background: lemonchiffon; }
.partialMatches { display: flex; flex-flow: row wrap; width: 75%; }
.partialMatch { margin-bottom: 1rem; margin-right: 1rem; width: 200px; }
.partialMatch .header { background: #555; color: white; font-weight: bold; }
.partialMatch.complete .header { background: darkgreen; }
.partialMatch.accept .header { background: darkblue; }
.partialMatch.die .header { background: darkred; }
.partialMatch .row { padding: 0.5rem; }
.partialMatch .row:not(.header):nth-child(odd) { background: #eee; }
.partialMatch .row:nth-child(even) { background: #ddd; }
</style>
</head>
<body>
<main>
<h1>Winnow Tests</h1>
<hr>
<div id="siftingTests">
<h2>Sifting Tests</h2>
</div>
<hr>
<div id="compilerTests">
<h2>Compiler Tests</h2>
</div>
</main>
<script src="datascript-0.18.4.min.js"></script>
<script src="util.js"></script>
<script src="parser.js"></script>
<script src="compiler.js"></script>
<script src="runner.js"></script>
<script src="tests.js"></script>
</body>
</html>