Skip to content

Commit 213b2c8

Browse files
committed
test: add one test for nodejs
1 parent fde6e3b commit 213b2c8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/basic_tests.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,23 @@ bool readme8() {
130130
TEST_SUCCEED()
131131
}
132132

133+
bool nodejs1() {
134+
TEST_START()
135+
auto base = ada::parse("http://other.com/");
136+
TEST_ASSERT(base.has_value(), true, "base should have a value");
137+
auto url = ada::parse("http://GOOgoo.com", &base.value());
138+
TEST_ASSERT(url.has_value(), true, "root should have a value");
139+
TEST_SUCCEED()
140+
}
141+
133142
int main() {
134143
bool success = set_host_should_return_false_sometimes()
135144
&& set_host_should_return_true_sometimes()
136145
&& set_hostname_should_return_false_sometimes()
137146
&& set_hostname_should_return_true_sometimes()
138147
&& readme1() && readme2() && readme3()
139148
&& readme4() && readme5() && readme6()
140-
&& readme7();
149+
&& readme7() && nodejs1();
141150
if(success) { return EXIT_SUCCESS; }
142151
return EXIT_FAILURE;
143152
}

0 commit comments

Comments
 (0)