PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/quick-test/tests/qt-test.reds

http://github.com/dockimbel/Red
Unknown | 76 lines | 50 code | 26 blank | 0 comment | 0 complexity | 5683929536cf90df31667d3e6f3a7056 MD5 | raw file
 1Red/System [
 2	Title:   "Red/System simple testing framework tests"
 3	Author:  "Peter W A Wood"
 4	File: 	 %qt-test.reds
 5	Tabs:	 4
 6	Rights:  "Copyright (C) 2011-2015 Peter W A Wood. All rights reserved."
 7	License: "BSD-3 - https://github.com/red/red/blob/master/BSD-3-License.txt"
 8]
 9
10#include %../quick-test.reds
11
12***start-run*** "Test Run 1"
13
14~~~start-file~~~  "First Test Set"
15
16===start-group=== "My First Group"
17
18  --test-- "Test 1"
19  --assert (true)                                      ;; pass
20  
21  --test-- "Test 2"
22  --assert (true)                                      ;; pass
23  --assert (true)                                      ;; pass
24  
25  --test-- "Test 3"
26  --assert (false)                                     ;; fail
27  
28  --test-- "Test 4"
29  --assert 1 = 1                                       ;; pass
30  
31  --test-- "Test 5"
32  --assert 1 = 2                                       ;; fail
33
34  --test-- "Test 6"                              ;; a longer test
35    step1: 1
36    step2: 2
37    step3: 3
38    step4: step1 + step2 + step3
39  --assert step4 = 6                                    ;;pass
40  
41===end-group===
42
43===start-group=== "My second group"
44
45  --test-- "msg-1"
46  --assert true
47  
48  --test-- "msg-2"
49  --assert true
50
51===end-group===
52
53===start-group=== "My third group"
54
55  --test-- "mtg-1"
56  --assert false
57  
58  --test-- "mtg-2"
59  --assert true
60  
61===end-group===
62
63~~~end-file~~~ 
64
65~~~start-file~~~ "Second Test Set"
66  
67  --test-- "Test 7"
68  --assert true
69  
70  --test-- "Test 8"
71  --assert false
72
73~~~end-file~~~ 
74
75***end-run***
76