michael@0: #include "gdb-tests.h" michael@0: #include "jsapi.h" michael@0: michael@0: FRAGMENT(jsval, simple) { michael@0: JS::Rooted fortytwo(cx, INT_TO_JSVAL(42)); michael@0: JS::Rooted negone(cx, INT_TO_JSVAL(-1)); michael@0: JS::Rooted undefined(cx, JSVAL_VOID); michael@0: JS::Rooted null(cx, JSVAL_NULL); michael@0: JS::Rooted js_true(cx, JSVAL_TRUE); michael@0: JS::Rooted js_false(cx, JSVAL_FALSE); michael@0: JS::Rooted elements_hole(cx, js::MagicValue(JS_ELEMENTS_HOLE)); michael@0: michael@0: JS::Rooted empty_string(cx); michael@0: empty_string.setString(JS_NewStringCopyZ(cx, "")); michael@0: JS::Rooted friendly_string(cx); michael@0: friendly_string.setString(JS_NewStringCopyZ(cx, "Hello!")); michael@0: michael@0: JS::Rooted global(cx); michael@0: global.setObject(*JS::CurrentGlobalOrNull(cx)); michael@0: michael@0: // Some interesting value that floating-point won't munge. michael@0: JS::Rooted onehundredthirtysevenonehundredtwentyeighths(cx, DOUBLE_TO_JSVAL(137.0 / 128.0)); michael@0: michael@0: breakpoint(); michael@0: michael@0: (void) fortytwo; michael@0: (void) negone; michael@0: (void) undefined; michael@0: (void) js_true; michael@0: (void) js_false; michael@0: (void) null; michael@0: (void) elements_hole; michael@0: (void) empty_string; michael@0: (void) friendly_string; michael@0: (void) global; michael@0: }