cpp-httplib icon indicating copy to clipboard operation
cpp-httplib copied to clipboard

Allow hex for ip6 literal addr, fix #1800

Open seanpquinn opened this issue 1 year ago • 2 comments

Built and ran all tests

[----------] Global test environment tear-down
[==========] 239 tests from 65 test suites ran. (128182 ms total)
[  PASSED  ] 239 tests.

  YOU HAVE 2 DISABLED TESTS


C:\Users\Sean Quinn\Desktop\github\cpp-httplib\test\x64\Debug\test.exe (process 4004) exited with code 0.
Press any key to close this window . . .

seanpquinn avatar May 02 '24 06:05 seanpquinn

@seanpquinn could you please add some unit tests for this change?

yhirose avatar May 02 '24 09:05 yhirose

Original code

Running main() from C:\Users\Sean Quinn\Desktop\github\cpp-httplib\test\gtest\gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from UniversalClientImplTest
[ RUN      ] UniversalClientImplTest.Ipv6LiteralAddress
C:\Users\Sean Quinn\Desktop\github\cpp-httplib\test\test.cc(1742): error: Expected equality of these values:
  cli.port()
    Which is: 80
  port
    Which is: 4321
[  FAILED  ] UniversalClientImplTest.Ipv6LiteralAddress (1 ms)
[----------] 1 test from UniversalClientImplTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (2 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] UniversalClientImplTest.Ipv6LiteralAddress

 1 FAILED TEST

C:\Users\Sean Quinn\Desktop\github\cpp-httplib\test\x64\Debug\test.exe (process 22920) exited with code 1.
Press any key to close this window . . .

with change

Running main() from C:\Users\Sean Quinn\Desktop\github\cpp-httplib\test\gtest\gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from UniversalClientImplTest
[ RUN      ] UniversalClientImplTest.Ipv6LiteralAddress
[       OK ] UniversalClientImplTest.Ipv6LiteralAddress (0 ms)
[----------] 1 test from UniversalClientImplTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (2 ms total)
[  PASSED  ] 1 test.

C:\Users\Sean Quinn\Desktop\github\cpp-httplib\test\x64\Debug\test.exe (process 26864) exited with code 0.
Press any key to close this window . . .

seanpquinn avatar May 04 '24 18:05 seanpquinn

@seanpquinn thanks for your contribution!

yhirose avatar May 26 '24 12:05 yhirose