Debian Codegraph @

packages/seacas/libraries/aprepro_lib/test_standard.out

raw
1 $ Test program for Aprepro
2 $
3 Test number representations
4 1 1 1 1 1
5 1 1 1 1 1
6
7 Test assign statements:
8 5 5 $ Should print 5 5
9 10 10 $ Should print 10 10
10 5 5 $ Should print 5 5
11 25 25 $ Should print 25 25
12 5 5 $ Should print 5 5
13 3125 3125 $ Should print 3125 3125
14 5 3125 3125 $ Should print 5 3125 3125
15
16 Test trigonometric functions (radians)
17 3.141592654 3.141592654 3.141592654 $ Three values of pi
18 0.7071067812 4.440892099e-16 $ sin(pi/4)
19 0.7071067812 0 $ cos(pi/4)
20 1 0 $ tan(pi/4)
21
22 Test trigonometric functions (degrees)
23 180 180 180
24 0.7071067812 2.842170943e-14 $ sin(180/4)
25 0.7071067812 0 $ cos(180/4)
26 1 0 $ tan(180/4)
27
28 Test max, min, sign, dim, abs
29 0.5 -1 $ Should be 0.5, -1
30 1 -0.5 $ Should be 1.0, -0.5
31 0 1 $ Should be 0 1
32 1 0 $ Should be 1 0
33 1 0 $ Should be 1 0
34
35 1 0
36 $ Test ternary...
37 correct
38 correct
39
40 $ Test ifdef lines
41 This line should be echoed. (a)
42 This line should be echoed. (b)
43 This line should be echoed. (c)
44 This line should be echoed. (d)
45
46 $ Test ifdef - else lines
47 This line should be echoed. (1)
48 This line should be echoed (4)
49
50 $ Test ifndef - else lines
51 This line should be echoed (6)
52 This line should be echoed. (7)
53 $ Lines a, b, c, d, 1, 4, 6, 7 should be echoed
54 $ Check line counting -- should be on line 78:
55
56 $ ========================================================================
57 $ Test string if lines
58 This line should be echoed ("greg")
59
60
61 This line should be echoed (empty)
62
63
64 $ ========================================================================
65 $ Test if lines
66 This line should be echoed. (a)
67 This line should be echoed. (b)
68 This line should be echoed. (c)
69
70 -4.440892099e-16
71 $ Test if - else lines
72 complex if works
73
74 square roots work
75
76 1 2
77 good nested if
78 good
79 make sure it is still good
80 $ ========================================================================
81 $ Test switch
82 This should echo
83 3.141592654
84
85
86 This should be equal to PI -- 3.141592654
87 $ Test int and [] (shortcut for int)
88 5 -5
89 5 -5
90
91 $ Test looping - print sin, cos from 0 to 90 by 5
92 0 0 1 1
93 5 0.08715574275 0.9961946981 1
94 10 0.1736481777 0.984807753 1
95 15 0.2588190451 0.9659258263 1
96 20 0.3420201433 0.9396926208 1
97 25 0.4226182617 0.906307787 1
98 30 0.5 0.8660254038 1
99 35 0.5735764364 0.8191520443 1
100 40 0.6427876097 0.7660444431 1
101 45 0.7071067812 0.7071067812 1
102 50 0.7660444431 0.6427876097 1
103 55 0.8191520443 0.5735764364 1
104 60 0.8660254038 0.5 1
105 65 0.906307787 0.4226182617 1
106 70 0.9396926208 0.3420201433 1
107 75 0.9659258263 0.2588190451 1
108 80 0.984807753 0.1736481777 1
109 85 0.9961946981 0.08715574275 1
110 90 1 6.123233996e-17 1
111
112 $$$$ Test formatting and string concatenation
113 %.10g
114 1 Using the format %.1g, PI = 3
115 2 Using the format %.2g, PI = 3.1
116 3 Using the format %.3g, PI = 3.14
117 4 Using the format %.4g, PI = 3.142
118 5 Using the format %.5g, PI = 3.1416
119 6 Using the format %.6g, PI = 3.14159
120 7 Using the format %.7g, PI = 3.141593
121 8 Using the format %.8g, PI = 3.1415927
122 9 Using the format %.9g, PI = 3.14159265
123 10 Using the format %.10g, PI = 3.141592654
124 11 Using the format %.11g, PI = 3.1415926536
125 12 Using the format %.12g, PI = 3.14159265359
126 13 Using the format %.13g, PI = 3.14159265359
127 14 Using the format %.14g, PI = 3.1415926535898
128 15 Using the format %.15g, PI = 3.14159265358979
129 16 Using the format %.16g, PI = 3.141592653589793
130 17 Using the format %.17g, PI = 3.1415926535897931
131 18 Using the format %.18g, PI = 3.14159265358979312
132 19 Using the format %.19g, PI = 3.141592653589793116
133 20 Using the format %.20g, PI = 3.141592653589793116
134 Reset format to default: %.10g
135
136 $$$$ Test formatting using the `format` function. _FORMAT is not modified
137 1 Using the format %.1f, PI = 3.1
138 2 Using the format %.2f, PI = 3.14
139 3 Using the format %.3f, PI = 3.142
140 4 Using the format %.4f, PI = 3.1416
141 5 Using the format %.5f, PI = 3.14159
142 6 Using the format %.6f, PI = 3.141593
143 7 Using the format %.7f, PI = 3.1415927
144 8 Using the format %.8f, PI = 3.14159265
145 9 Using the format %.9f, PI = 3.141592654
146 10 Using the format %.10f, PI = 3.1415926536
147 11 Using the format %.11f, PI = 3.14159265359
148 12 Using the format %.12f, PI = 3.141592653590
149 13 Using the format %.13f, PI = 3.1415926535898
150 14 Using the format %.14f, PI = 3.14159265358979
151 15 Using the format %.15f, PI = 3.141592653589793
152 16 Using the format %.16f, PI = 3.1415926535897931
153 17 Using the format %.17f, PI = 3.14159265358979312
154 18 Using the format %.18f, PI = 3.141592653589793116
155 19 Using the format %.19f, PI = 3.1415926535897931160
156 20 Using the format %.20f, PI = 3.14159265358979311600
157
158 $$$$ Test string rescanning and executing
159
160 Original String:
161 This is line 1: {a = atan2(0,-1)}
162 This is line 2: {sin(a/4)}
163 This is line 3: {cos(a/4)}
164 Rescanned String:
165 This is line 1: 3.141592654
166 This is line 2: 0.7071067812
167 This is line 3: 0.7071067812
168 Original String:
169 This has an embedded string: {T = "This is a string"}
170 Print Value of variable T = 0
171 Rescanned String:
172 This has an embedded string: This is a string
173 Print Value of variable T = This is a string
174
175 Original String: atan2(0,-1)
176 Executed String: 3.141592654
177
178 string = one two, three
179 delimiter " ,"
180 word count = 3
181 second word = "two"
182
183 string = (one two, three * four - five
184 delimiter " ,(*-"
185 word count = 5
186 second word = "two"
187
188
189 string = one two, three
190 delimiter " ,"
191 word count = 3
192
193 word 1 = "one"
194 word 2 = "two"
195 word 3 = "three"
196
197 $ Check parsing of escaped braces...
198 { int a = b + 1.570796327 }
199 { }
200
201 $ Test variable deletion
202 2.449489743
203 2.449489743
204
205 0 This should print warning about undefined variable
206
207 $ Test extract
208 test string is found
209
210
211 $ Test string tokenization optimization
212 51,52,53,54,61,62,63,64
213 71,72,73,74,81,82,83,84
214 Word 1 of list1 and list2 are 51 and 71
215 Word 2 of list1 and list2 are 52 and 72
216 Word 3 of list1 and list2 are 53 and 73
217 Word 4 of list1 and list2 are 54 and 74
218 Word 5 of list1 and list2 are 61 and 81
219 Word 6 of list1 and list2 are 62 and 82
220 Word 7 of list1 and list2 are 63 and 83
221 Word 8 of list1 and list2 are 64 and 84
222
223 $$$$ Test double brace echo off/on
224 Nothing further on line:
225 Noecho followed by non-parsing output: This should be echoed
226 Echo, noecho setting variable, then echo that variable: echo++echo
227 $End of test file