Ben Chan | c1e766c | 2011-11-21 12:56:59 -0800 | [diff] [blame] | 1 | // 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 Chan | 5ccd9fe | 2013-11-13 18:28:27 -0800 | [diff] [blame] | 5 | #include "cros-disks/format_manager.h" |
Ben Chan | c1e766c | 2011-11-21 12:56:59 -0800 | [diff] [blame] | 6 | |
| 7 | #include <gtest/gtest.h> |
| 8 | |
Ben Chan | c1e766c | 2011-11-21 12:56:59 -0800 | [diff] [blame] | 9 | namespace cros_disks { |
| 10 | |
| 11 | class FormatManagerTest : public ::testing::Test { |
Ben Chan | 445852f | 2017-10-02 23:00:16 -0700 | [diff] [blame] | 12 | public: |
| 13 | FormatManagerTest() : manager_(nullptr) {} |
| 14 | |
Ben Chan | c1e766c | 2011-11-21 12:56:59 -0800 | [diff] [blame] | 15 | protected: |
| 16 | FormatManager manager_; |
| 17 | }; |
| 18 | |
| 19 | TEST_F(FormatManagerTest, GetFormatProgramPath) { |
| 20 | EXPECT_EQ("", manager_.GetFormatProgramPath("nonexistent-fs")); |
| 21 | } |
| 22 | |
| 23 | TEST_F(FormatManagerTest, IsFilesystemSupported) { |
| 24 | EXPECT_TRUE(manager_.IsFilesystemSupported("vfat")); |
Austin Tankiang | 47b7cc2 | 2019-05-22 16:51:16 +1000 | [diff] [blame] | 25 | EXPECT_TRUE(manager_.IsFilesystemSupported("exfat")); |
| 26 | EXPECT_TRUE(manager_.IsFilesystemSupported("ntfs")); |
Ben Chan | c1e766c | 2011-11-21 12:56:59 -0800 | [diff] [blame] | 27 | EXPECT_FALSE(manager_.IsFilesystemSupported("nonexistent-fs")); |
| 28 | } |
| 29 | |
| 30 | } // namespace cros_disks |