[cscore] VideoMode: Add equals override (Java) (#5397)

This commit is contained in:
Sriman Achanta
2023-06-19 20:12:07 -04:00
committed by GitHub
parent d6bd72d738
commit d4ea5fa902
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
// 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.
package edu.wpi.first.cscore;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import org.junit.jupiter.api.Test;
class VideoModeTest {
@Test
void equalityTest() {
VideoMode a = new VideoMode(VideoMode.PixelFormat.kMJPEG, 1920, 1080, 30);
VideoMode b = new VideoMode(VideoMode.PixelFormat.kMJPEG, 1920, 1080, 30);
assertEquals(a, b);
assertNotEquals(a, null);
}
}