1 // Copyright 2018 The Chromium 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.
5 #include "device/serial/serial_device_enumerator.h"
10 #include "testing/gtest/include/gtest/gtest.h"
14 TEST(SerialDeviceEnumeratorTest, GetDevices) {
15 // There is no guarantee that a test machine will have a serial device
16 // available. The purpose of this test is to ensure that the process of
17 // attempting to enumerate devices does not cause a crash.
18 auto enumerator = SerialDeviceEnumerator::Create();
19 ASSERT_TRUE(enumerator);
20 std::vector<mojom::SerialDeviceInfoPtr> devices = enumerator->GetDevices();