Skip to content

Commit

Permalink
add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Sep 11, 2024
1 parent 9cee45a commit 05e09e9
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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/concurrentqueue.h"

#include <gtest/gtest.h>

TEST(ConcurrentQueueTest, Basic) {
wpi::ConcurrentQueue<int> q;
q.enqueue(25);

int item;
bool found = q.try_dequeue(item);
EXPECT_TRUE(found);
EXPECT_EQ(item, 25);
}

0 comments on commit 05e09e9

Please sign in to comment.