11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst common = require('../../common'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst binding = require(`./build/${common.buildType}/test_new_target`); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciclass Class extends binding.BaseClass { 81cb0ef41Sopenharmony_ci constructor() { 91cb0ef41Sopenharmony_ci super(); 101cb0ef41Sopenharmony_ci this.method(); 111cb0ef41Sopenharmony_ci } 121cb0ef41Sopenharmony_ci method() { 131cb0ef41Sopenharmony_ci this.ok = true; 141cb0ef41Sopenharmony_ci } 151cb0ef41Sopenharmony_ci} 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ciassert.ok(new Class() instanceof binding.BaseClass); 181cb0ef41Sopenharmony_ciassert.ok(new Class().ok); 191cb0ef41Sopenharmony_ciassert.ok(binding.OrdinaryFunction()); 201cb0ef41Sopenharmony_ciassert.ok( 211cb0ef41Sopenharmony_ci new binding.Constructor(binding.Constructor) instanceof binding.Constructor); 22