constructor.js revision 1365:833a4df84bc7
190075Sobrien/*
2169689Skan * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
3169689Skan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4169689Skan *
590075Sobrien * This code is free software; you can redistribute it and/or modify it
6132718Skan * under the terms of the GNU General Public License version 2 only, as
790075Sobrien * published by the Free Software Foundation.
8132718Skan *
990075Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT
1090075Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1190075Sobrien * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1290075Sobrien * version 2 for more details (a copy is included in the LICENSE file that
13132718Skan * accompanied this code).
1490075Sobrien *
1590075Sobrien * You should have received a copy of the GNU General Public License version
1690075Sobrien * 2 along with this work; if not, write to the Free Software Foundation,
1790075Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1890075Sobrien *
19132718Skan * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20169689Skan * or visit www.oracle.com if you need additional information or have any
21169689Skan * questions.
2290075Sobrien */
2390075Sobrien
2490075Sobrien/**
2590075Sobrien * @test
2690075Sobrien * @option -Dnashorn.debug=true
2790075Sobrien * @fork
2890075Sobrien */
2990075Sobrien
3090075Sobrienload(__DIR__ + "point.js");
3190075Sobrien
3290075Sobrien// use constructor defined in a different script file
3390075Sobrien// These objects should share the map
3490075SobrienassertSameMap(new Point(2, 3), new Point(43, 23));
3590075SobrienassertSameMap(new Point(), new Point());
3690075SobrienassertEqualWithoutTypeMap(new Point(), new Point(3, 1));
3790075Sobrien