chromium/components/language_detection/core/language_detection_model_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/language_detection/core/language_detection_model.h"

#include <memory>

#include "base/compiler_specific.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/metrics/metrics_hashes.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "components/language_detection/core/language_detection_provider.h"
#include "components/language_detection/testing/language_detection_test_utils.h"
#include "components/translate/core/common/translate_constants.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace language_detection {

base::File CreateInvalidModelFile() {}

class LanguageDetectionTest : public testing::Test {};

TEST_F(LanguageDetectionTest, ModelUnavailable) {}

TEST_F(LanguageDetectionTest, EmptyFileProvided) {}

TEST_F(LanguageDetectionTest, UnsupportedModelFileProvided) {}

class LanguageDetectionValidTest : public LanguageDetectionTest {};

TEST_F(LanguageDetectionValidTest, ValidModelFileProvided) {}

TEST_F(LanguageDetectionValidTest, DetectLanguageMetrics) {}

TEST_F(LanguageDetectionValidTest, Truncation) {}

// Regression test for https://crbug.com/1414235. This test is expecting that
// the code under test does not crash on ASan.
TEST_F(LanguageDetectionValidTest, UnalignedString) {}

}  // namespace language_detection