Lines Matching refs:result
63 static void ExpectBoolean(bool expected, Local<Value> result) { in ExpectBoolean() argument
64 CHECK(result->IsBoolean()); in ExpectBoolean()
65 CHECK_EQ(expected, result->BooleanValue()); in ExpectBoolean()
69 static void ExpectInt32(int32_t expected, Local<Value> result) { in ExpectInt32() argument
70 CHECK(result->IsInt32()); in ExpectInt32()
71 CHECK_EQ(expected, result->Int32Value()); in ExpectInt32()
75 static void ExpectNumber(double expected, Local<Value> result) { in ExpectNumber() argument
76 CHECK(result->IsNumber()); in ExpectNumber()
77 CHECK_EQ(expected, result->NumberValue()); in ExpectNumber()
81 static void ExpectUndefined(Local<Value> result) { in ExpectUndefined() argument
82 CHECK(result->IsUndefined()); in ExpectUndefined()
91 Local<Value> result = CompileRun("0x271828;"); in TEST() local
92 ExpectInt32(0x271828, result); in TEST()
99 Local<Value> result = CompileRun("var my_global_var = 0x123; my_global_var;"); in TEST() local
100 ExpectInt32(0x123, result); in TEST()
107 Local<Value> result = CompileRun( in TEST() local
110 ExpectInt32(0x314, result); in TEST()
117 Local<Value> result = CompileRun( in TEST() local
124 ExpectInt32(0x2468, result); in TEST()
139 Local<Value> result = CompileRun(buffer); in if_comparison_testcontext_helper() local
140 ExpectInt32(expect, result); in if_comparison_testcontext_helper()
156 Local<Value> result = CompileRun(buffer); in if_comparison_effectcontext_helper() local
157 ExpectInt32(expect, result); in if_comparison_effectcontext_helper()
195 Local<Value> result; in TEST() local
197 result = CompileRun("var a = 1234; +a"); in TEST()
198 ExpectInt32(1234, result); in TEST()
200 result = CompileRun("var a = 1234.5; +a"); in TEST()
201 ExpectNumber(1234.5, result); in TEST()
203 result = CompileRun("var a = '1234'; +a"); in TEST()
204 ExpectInt32(1234, result); in TEST()
206 result = CompileRun("var a = '1234.5'; +a"); in TEST()
207 ExpectNumber(1234.5, result); in TEST()
209 result = CompileRun("var a = 1234; +(a = 4321); a"); in TEST()
210 ExpectInt32(4321, result); in TEST()
217 Local<Value> result; in TEST() local
218 result = CompileRun("var a = 1234; -a"); in TEST()
219 ExpectInt32(-1234, result); in TEST()
220 result = CompileRun("var a = 1234.5; -a"); in TEST()
221 ExpectNumber(-1234.5, result); in TEST()
222 result = CompileRun("var a = 1234; -(a = 4321); a"); in TEST()
223 ExpectInt32(4321, result); in TEST()
224 result = CompileRun("var a = '1234'; -a"); in TEST()
225 ExpectInt32(-1234, result); in TEST()
226 result = CompileRun("var a = '1234.5'; -a"); in TEST()
227 ExpectNumber(-1234.5, result); in TEST()
234 Local<Value> result; in TEST() local
235 result = CompileRun("var a = 1234; void (a);"); in TEST()
236 ExpectUndefined(result); in TEST()
237 result = CompileRun("var a = 0; void (a = 42); a"); in TEST()
238 ExpectInt32(42, result); in TEST()
239 result = CompileRun("var a = 0; void (a = 42);"); in TEST()
240 ExpectUndefined(result); in TEST()
247 Local<Value> result; in TEST() local
248 result = CompileRun("var a = 1234; !a"); in TEST()
249 ExpectBoolean(false, result); in TEST()
250 result = CompileRun("var a = 0; !a"); in TEST()
251 ExpectBoolean(true, result); in TEST()
252 result = CompileRun("var a = 0; !(a = 1234); a"); in TEST()
253 ExpectInt32(1234, result); in TEST()
254 result = CompileRun("var a = '1234'; !a"); in TEST()
255 ExpectBoolean(false, result); in TEST()
256 result = CompileRun("var a = ''; !a"); in TEST()
257 ExpectBoolean(true, result); in TEST()
258 result = CompileRun("var a = 1234; !!a"); in TEST()
259 ExpectBoolean(true, result); in TEST()
260 result = CompileRun("var a = 0; !!a"); in TEST()
261 ExpectBoolean(false, result); in TEST()
262 result = CompileRun("var a = 0; if ( !a ) { 1; } else { 0; }"); in TEST()
263 ExpectInt32(1, result); in TEST()
264 result = CompileRun("var a = 1; if ( !a ) { 1; } else { 0; }"); in TEST()
265 ExpectInt32(0, result); in TEST()