-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4caa0d
commit b7568a1
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
wpiutil/src/test/native/cpp/telemetry/TelemetryTableTest.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// 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 "wpi/telemetry/TelemetryTable.h" // NOLINT(build/include_order) | ||
|
||
#include <gtest/gtest.h> | ||
|
||
namespace telemetrytest { | ||
struct TestStructADL { | ||
double x = 0; | ||
double y = 0; | ||
}; | ||
|
||
void Log(wpi::TelemetryTable& table, const TestStructADL& value) { | ||
table.Log("x", value.x); | ||
table.Log("y", value.y); | ||
} | ||
} // namespace telemetrytest | ||
|
||
TEST(TelemetryTableTest, LogADL) { | ||
wpi::TelemetryTable& table = wpi::TelemetryRegistry::GetTable("/"); | ||
telemetrytest::TestStructADL val; | ||
table.Log("testadl", val); | ||
} | ||
|