File: testUtils_tests.cpp

package info (click to toggle)
cpr 1.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,452 kB
  • sloc: cpp: 14,315; ansic: 637; sh: 139; xml: 38; makefile: 16
file content (16 lines) | stat: -rw-r--r-- 318 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <cstdint>
#include <gtest/gtest.h>

#include "testUtils.hpp"

TEST(TestUtils, GetUnusedPort) {
    uint16_t port{0};
    ASSERT_NO_THROW(port = cpr::test::get_free_port());
    EXPECT_NE(port, 0);
}


int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}