tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TestNumberingSystem.cpp (813B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 #include "gtest/gtest.h"
      5 
      6 #include "mozilla/intl/NumberingSystem.h"
      7 #include "mozilla/Span.h"
      8 
      9 namespace mozilla::intl {
     10 
     11 TEST(IntlNumberingSystem, GetName)
     12 {
     13  auto numbers_en = NumberingSystem::TryCreate("en").unwrap();
     14  ASSERT_EQ(numbers_en->GetName().unwrap(), MakeStringSpan("latn"));
     15 
     16  auto numbers_ar = NumberingSystem::TryCreate("ar-EG").unwrap();
     17  ASSERT_EQ(numbers_ar->GetName().unwrap(), MakeStringSpan("arab"));
     18 
     19  auto numbers_ff_Adlm = NumberingSystem::TryCreate("ff-Adlm").unwrap();
     20  ASSERT_EQ(numbers_ff_Adlm->GetName().unwrap(), MakeStringSpan("adlm"));
     21 }
     22 
     23 }  // namespace mozilla::intl