Skip to content

Commit 6a622af

Browse files
authored
Merge pull request #1424 from google/using-string
`using std::string` test
2 parents 77edf1a + aff3e6a commit 6a622af

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

integration-tests/tests/integration_test.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12386,6 +12386,32 @@ fn test_cpp_union_pod() {
1238612386
run_test_expect_fail("", hdr, quote! {}, &[], &["CorrelationId_t_"]);
1238712387
}
1238812388

12389+
#[test]
12390+
fn test_using_string_function() {
12391+
let hdr = indoc! {"
12392+
#include <string>
12393+
using std::string;
12394+
void foo(const string &a);
12395+
"};
12396+
let rs = quote! {};
12397+
run_test("", hdr, rs, &["foo"], &[]);
12398+
}
12399+
12400+
#[test]
12401+
fn test_using_string_method() {
12402+
let hdr = indoc! {"
12403+
#include <string>
12404+
using std::string;
12405+
class Foo
12406+
{
12407+
public:
12408+
Foo bar(const string &a);
12409+
};
12410+
"};
12411+
let rs = quote! {};
12412+
run_test("", hdr, rs, &["Foo"], &[]);
12413+
}
12414+
1238912415
#[test]
1239012416
#[ignore] // https://github.com/google/autocxx/issues/1382
1239112417
fn test_override_typedef_fn() {

0 commit comments

Comments
 (0)