mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Make C++ test names more consistent (#3586)
Inconsistent names were found using the following regular expressions. * `rg "TEST(_F|_P)?\(\w+,\s+\w+Test\)"` * `rg "TEST(_F|_P)?\(\w+,\s+Test\w+\)"` * `rg "TEST(_F|_P)?\(\w+Tests,\s+\w+\)"` Fixes #3495.
This commit is contained in:
25
hal/src/test/native/cpp/handles/HandleTest.cpp
Normal file
25
hal/src/test/native/cpp/handles/HandleTest.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "hal/HAL.h"
|
||||
#include "hal/handles/IndexedClassedHandleResource.h"
|
||||
|
||||
#define HAL_TestHandle HAL_Handle
|
||||
|
||||
namespace {
|
||||
class MyTestClass {};
|
||||
} // namespace
|
||||
|
||||
namespace hal {
|
||||
TEST(HandleTest, ClassedHandle) {
|
||||
hal::IndexedClassedHandleResource<HAL_TestHandle, MyTestClass, 8,
|
||||
HAL_HandleEnum::Vendor>
|
||||
testClass;
|
||||
int32_t status = 0;
|
||||
testClass.Allocate(0, std::make_unique<MyTestClass>(), &status);
|
||||
EXPECT_EQ(0, status);
|
||||
}
|
||||
|
||||
} // namespace hal
|
||||
Reference in New Issue
Block a user