Opened 6 years ago

Closed 6 years ago

#14377 closed bug (fixed)

BUrl unit tests fail

Reported by: KapiX Owned by: apl-haiku
Priority: normal Milestone: Unscheduled
Component: Kits/Network Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Repro: UnitTester UrlTest

- FAILURES: 3
    TestCaller UrlTest::ParseTest: Expected: http://user:pass@www.foo.com:80/path?, but was: http://user:pass@www.foo.com:80/path.
    TestCaller UrlTest::TestIsValid: Set to an invalid host
    TestCaller UrlTest::RelativeUriTest: Expected: foo:/c, but was: foo:a/c. Base: foo:a/b Relative: ../c
  • ParseTest: // Test that parsing a valid URL and converting back to string doesn't alter it [1]
  • TestIsValid: looks like assert condition is reversed [2]
  • RelativeUriTest: // However, foo:/c is what the RFC says we should get. [3]

[1] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/service/UrlTest.cpp#n31

[2] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/service/UrlTest.cpp#n71

[3] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/service/UrlTest.cpp#n271

Change History (4)

comment:1 by KapiX, 6 years ago

Oops, correction: TestIsValid condition is OK, it appears BUrl considers "<invalid>" URL valid.

comment:2 by pulkomandy, 6 years ago

Owner: changed from nobody to apl-haiku
Status: newassigned

Reassigning to Andrew as he rewrote the parser, but IIRC the tests were still working back then. I'll try to have a look too.

comment:3 by apl-haiku, 6 years ago

Hi; I am a bit busy at the moment but will see what I can do. I'm looking at Set to an invalid host first.

comment:4 by waddlesplash, 6 years ago

Resolution: fixed
Status: assignedclosed

Last fixes merged in hrev52332. Thanks, apl!

Note: See TracTickets for help on using tickets.