mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Prepare cscore for merge into allwpilib.
This commit is contained in:
18
cscore/src/test/java/edu/wpi/cscore/JNITest.java
Normal file
18
cscore/src/test/java/edu/wpi/cscore/JNITest.java
Normal file
@@ -0,0 +1,18 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package edu.wpi.cscore;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class JNITest {
|
||||
@Test
|
||||
public void jniLinkTest() {
|
||||
// Test to verify that the JNI test link works correctly.
|
||||
edu.wpi.cscore.CameraServerJNI.getHostname();
|
||||
}
|
||||
}
|
||||
22
cscore/src/test/native/cpp/CameraSourceTest.cpp
Normal file
22
cscore/src/test/native/cpp/CameraSourceTest.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "cscore.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace cs {
|
||||
|
||||
class CameraSourceTest : public ::testing::Test {
|
||||
protected:
|
||||
CameraSourceTest() {}
|
||||
};
|
||||
|
||||
TEST_F(CameraSourceTest, HTTPCamera) {
|
||||
auto source = HttpCamera("axis", "http://localhost:8000");
|
||||
}
|
||||
|
||||
} // namespace cs
|
||||
14
cscore/src/test/native/cpp/main.cpp
Normal file
14
cscore/src/test/native/cpp/main.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
int ret = RUN_ALL_TESTS();
|
||||
return ret;
|
||||
}
|
||||
Reference in New Issue
Block a user