// Copyright 2021 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// Flags: --harmony_intl_best_fit_matcher//// Test the return list is subset of the request list.// https://tc39.es/ecma402/#sec-bestfitsupportedlocales// 9.2.9 BestFitSupportedLocales ( availableLocales, requestedLocales )// The BestFitSupportedLocales abstract operation returns the SUBSET of the// provided BCP 47 language priority list requestedLocales for which// availableLocales has a matching locale when using the Best Fit Matcher// algorithm. Locales appear in the same order in the returned list as in// requestedLocales. The steps taken are implementation dependent.functionassertSubarray(a,b){assertTrue(a.every(val=>b.includes(val)),['returns:',a,'requested:',b]);}functionverifySupportedLocalesAreSubarray(f,ll){assertSubarray(f(ll),ll);}verifySupportedLocalesAreSubarray(Intl.DateTimeFormat.supportedLocalesOf,['en','ceb']);verifySupportedLocalesAreSubarray(Intl.DateTimeFormat.supportedLocalesOf,['en','ceb','fil']);