flutter_flutter/shell/platform/fuchsia/flutter/runner_tzdata_unittest.cc
Filip Filmar 29998f07fa Configures ICU to load the timezone data (#13952)
The timezone data in Fuchsia is at a fixed path. This will have the
flutter runner attempt to load it and log, but not fail if loading
does not work out.

Added two tests

(1) Shows that the specific TZ data version loaded takes effect after
initialization

(2) Shows that when TZ data files are absent the initialization
continues.
2019-12-05 17:32:55 -08:00

21 lines
697 B
C++

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <gtest/gtest.h>
#include "runner.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
namespace flutter_runner {
// This test has not been configured with tzdata files. This test shows that
// even without the data files, the runner continues initialization. It will
// use whatever the base data exists in icudtl.dat.
TEST(RunnerTZDataTest, LoadsWithoutTZDataPresent) {
bool success = Runner::SetupICUInternal();
ASSERT_TRUE(success) << "failed to load set up ICU data";
}
} // namespace flutter_runner