blob: ffd6c04b1f783e576dea754a0eaab2559348c218 [file] [log] [blame]
Ben Chanc1e766c2011-11-21 12:56:59 -08001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Ben Chan5ccd9fe2013-11-13 18:28:27 -08005#include "cros-disks/format_manager.h"
Ben Chanc1e766c2011-11-21 12:56:59 -08006
7#include <gtest/gtest.h>
8
Ben Chanc1e766c2011-11-21 12:56:59 -08009namespace cros_disks {
10
11class FormatManagerTest : public ::testing::Test {
Ben Chan445852f2017-10-02 23:00:16 -070012 public:
13 FormatManagerTest() : manager_(nullptr) {}
14
Ben Chanc1e766c2011-11-21 12:56:59 -080015 protected:
16 FormatManager manager_;
17};
18
19TEST_F(FormatManagerTest, GetFormatProgramPath) {
20 EXPECT_EQ("", manager_.GetFormatProgramPath("nonexistent-fs"));
21}
22
23TEST_F(FormatManagerTest, IsFilesystemSupported) {
24 EXPECT_TRUE(manager_.IsFilesystemSupported("vfat"));
Austin Tankiang47b7cc22019-05-22 16:51:16 +100025 EXPECT_TRUE(manager_.IsFilesystemSupported("exfat"));
26 EXPECT_TRUE(manager_.IsFilesystemSupported("ntfs"));
Ben Chanc1e766c2011-11-21 12:56:59 -080027 EXPECT_FALSE(manager_.IsFilesystemSupported("nonexistent-fs"));
28}
29
30} // namespace cros_disks