Browse Source

API testcase fixes for updated error messages

pull/30/head
Sami Vaarala 10 years ago
parent
commit
278d188e58
  1. 12
      api-testcases/test-del-prop.c
  2. 2
      api-testcases/test-get-prop.c
  3. 4
      api-testcases/test-has-prop.c
  4. 4
      api-testcases/test-pcall-prop.c
  5. 2
      api-testcases/test-put-prop-primbase.c
  6. 6
      api-testcases/test-put-prop.c

12
api-testcases/test-del-prop.c

@ -13,15 +13,15 @@ final array: ["foo","bar",null]
final top: 3
==> rc=0, result='undefined'
*** test_1b (duk_pcall)
==> rc=1, result='TypeError: property not configurable'
==> rc=1, result='TypeError: not configurable'
*** test_1c (duk_pcall)
==> rc=1, result='TypeError: property not configurable'
==> rc=1, result='TypeError: not configurable'
*** test_1d (duk_safe_call)
==> rc=1, result='Error: invalid index'
*** test_1e (duk_safe_call)
==> rc=1, result='Error: invalid index'
*** test_1f (duk_safe_call)
==> rc=1, result='TypeError: invalid base reference for property delete'
==> rc=1, result='TypeError: invalid base value'
*** test_2a (duk_safe_call)
delete obj.foo -> rc=1
delete obj.nonexistent -> rc=1
@ -36,9 +36,9 @@ final array: ["foo","bar",null]
final top: 3
==> rc=0, result='undefined'
*** test_2b (duk_pcall)
==> rc=1, result='TypeError: property not configurable'
==> rc=1, result='TypeError: not configurable'
*** test_2c (duk_pcall)
==> rc=1, result='TypeError: property not configurable'
==> rc=1, result='TypeError: not configurable'
*** test_2d (duk_safe_call)
==> rc=1, result='Error: invalid index'
*** test_2e (duk_safe_call)
@ -54,7 +54,7 @@ final array: ["foo","bar",null]
final top: 3
==> rc=0, result='undefined'
*** test_3b (duk_pcall)
==> rc=1, result='TypeError: property not configurable'
==> rc=1, result='TypeError: not configurable'
*** test_3c (duk_safe_call)
==> rc=1, result='Error: invalid index'
*** test_3d (duk_safe_call)

2
api-testcases/test-get-prop.c

@ -20,7 +20,7 @@ configuration setting present, value: setting value
final top: 4
==> rc=0, result='undefined'
*** test_1e (duk_safe_call)
==> rc=1, result='TypeError: invalid base reference for property read'
==> rc=1, result='TypeError: invalid base value'
*** test_2a (duk_safe_call)
obj.foo -> rc=1, result='fooval'
obj.nonexistent -> rc=0, result='undefined'

4
api-testcases/test-has-prop.c

@ -13,9 +13,9 @@ final top: 3
*** test_1c (duk_safe_call)
==> rc=1, result='Error: invalid index'
*** test_1d (duk_safe_call)
==> rc=1, result='TypeError: invalid base reference for property existence check'
==> rc=1, result='TypeError: invalid base value'
*** test_1e (duk_safe_call)
==> rc=1, result='TypeError: invalid base reference for property existence check'
==> rc=1, result='TypeError: invalid base value'
*** test_2a (duk_safe_call)
obj.foo -> rc=1
obj.nonexistent -> rc=0

4
api-testcases/test-pcall-prop.c

@ -15,7 +15,7 @@ rc=0, result='21'
rc=1, result='Error: my error'
==> rc=0, result='undefined'
*** test_5 (duk_safe_call)
rc=1, result='TypeError: invalid base reference for property read'
rc=1, result='TypeError: invalid base value'
==> rc=0, result='undefined'
*** test_6 (duk_safe_call)
rc=1, result='RangeError: getter error'
@ -24,7 +24,7 @@ rc=1, result='RangeError: getter error'
rc=1, result='Error: invalid index'
==> rc=0, result='undefined'
*** test_8 (duk_safe_call)
rc=1, result='TypeError: call target not callable'
rc=1, result='TypeError: not callable'
==> rc=0, result='undefined'
*** test_9 (duk_safe_call)
==> rc=1, result='Error: invalid call args'

2
api-testcases/test-put-prop-primbase.c

@ -4,7 +4,7 @@ put rc=0
final top: 1
==> rc=0, result='undefined'
*** test_put (duk_pcall)
==> rc=1, result='TypeError: non-object base reference'
==> rc=1, result='TypeError: invalid base value'
===*/
int test_put(duk_context *ctx) {

6
api-testcases/test-put-prop.c

@ -23,7 +23,7 @@ final top: 2
strict: 1
get Math -> rc=1
Math.PI=3.141592653589793
==> rc=1, result='TypeError: property not writable'
==> rc=1, result='TypeError: not writable'
*** test_ex_accessor_wo_setter (duk_safe_call)
strict: 0
eval:
@ -56,7 +56,7 @@ eval:
return o;
})()
top after eval: 1
==> rc=1, result='TypeError: undefined setter for accessor'
==> rc=1, result='TypeError: setter undefined'
*** test_ex_setter_throws (duk_safe_call)
strict: 0
eval:
@ -115,7 +115,7 @@ strict: 1
eval:
(function () { var o = { foo: 1 }; Object.preventExtensions(o); return o; })()
top after eval: 1
==> rc=1, result='TypeError: object not extensible'
==> rc=1, result='TypeError: not extensible'
===*/
/* Test property writing API call.

Loading…
Cancel
Save