Skip to content

Commit

Permalink
Add test of macro-generated inline namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored and emilio committed Nov 28, 2024
1 parent 6f2e563 commit 9123846
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
24 changes: 24 additions & 0 deletions bindgen-tests/tests/expectations/tests/inline_namespace_macro.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions bindgen-tests/tests/headers/inline_namespace_macro.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// bindgen-flags: --enable-cxx-namespaces -- -std=c++11

#include "namespace/nsdefine.h"

BEGIN_NAMESPACE

class duration {};

END_NAMESPACE
4 changes: 4 additions & 0 deletions bindgen-tests/tests/headers/namespace/nsdefine.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#pragma once

#define BEGIN_NAMESPACE namespace repro { inline namespace __1 {
#define END_NAMESPACE } }

0 comments on commit 9123846

Please sign in to comment.