js/src/jsapi-tests/selfTest.cpp
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Mon, 04 Jul 2022 06:56:36 +0000
changeset 622863 4fbd36dde537f349060c2d47a934f411a9a2bf62
parent 449035 66eb1f485c1a3ea81372758bc92292c9428b17cd
permissions -rw-r--r--
no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD bn -> 48e59454a734b72290b4cf280e6e66e4d0c069fa dsb -> 2971738372d2acdcc3650a9dc4d4f120cdedf940 es-CL -> aa2c4e0a39c2bc090a4e469f1ff915f644b6af30 it -> f544bcbf9850cd478cffde827b3e0eace2cd646b mk -> 6db6197027b62126eb7aaec789f82fed5ad35afd pt-BR -> dcc404ec36a8184473c5b0a5f3d2431f306f2de1 uk -> adc076493d0a38cb619af6168aa1e904e1a76c27

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * vim: set ts=8 sts=2 et sw=2 tw=80:
 */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "jsapi-tests/tests.h"

BEGIN_TEST(selfTest_NaNsAreSame) {
  JS::RootedValue v1(cx), v2(cx);
  EVAL("0/0", &v1);  // NaN
  CHECK_SAME(v1, v1);

  EVAL("Math.sin('no')", &v2);  // also NaN
  CHECK_SAME(v1, v2);
  return true;
}
END_TEST(selfTest_NaNsAreSame)