1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
* vim: set ts=8 sw=4 et tw=99:
4
* Tests that the column number of error reports is properly copied over from
5
* other reports when invoked from the C++ api.
7
/* This Source Code Form is subject to the terms of the Mozilla Public
8
* License, v. 2.0. If a copy of the MPL was not distributed with this
9
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
15
static uint32_t column = 0;
18
my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
20
column = report->column;
23
BEGIN_TEST(testErrorCopying_columnCopied)
26
//0123456789012345678901234567
27
EXEC("function check() { Object; foo; }");
29
JS::RootedValue rval(cx);
30
JS_SetErrorReporter(cx, my_ErrorReporter);
31
CHECK(!JS_CallFunctionName(cx, global, "check", 0, NULL, rval.address()));
35
END_TEST(testErrorCopying_columnCopied)