Skip to content

Commit

Permalink
tests: Add a test for rust-lang#2556
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Jun 15, 2023
1 parent 2b36168 commit eebb3eb
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
43 changes: 43 additions & 0 deletions bindgen-tests/tests/expectations/tests/issue-2556.rs

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

4 changes: 4 additions & 0 deletions bindgen-tests/tests/headers/issue-2556.h
@@ -0,0 +1,4 @@
// bindgen-flags: --enable-cxx-namespaces -- -x c++ -Itests/headers -include tests/headers/issue-2556/nsStyleStruct.h -include tests/headers/issue-2556/LayoutConstants.h

#include "issue-2556/nsSize.h"
#include "issue-2556/nsStyleStruct.h"
7 changes: 7 additions & 0 deletions bindgen-tests/tests/headers/issue-2556/LayoutConstants.h
@@ -0,0 +1,7 @@
#include "nsSize.h"

namespace foo {

static constexpr nsSize kFallbackIntrinsicSize(0, 0);

} // namespace mozilla
6 changes: 6 additions & 0 deletions bindgen-tests/tests/headers/issue-2556/nsSize.h
@@ -0,0 +1,6 @@
#pragma once

struct nsSize {
int width, height;
constexpr nsSize(int aWidth, int aHeight) : width(aWidth), height(aHeight) {}
};
3 changes: 3 additions & 0 deletions bindgen-tests/tests/headers/issue-2556/nsStyleStruct.h
@@ -0,0 +1,3 @@
#pragma once

#include "nsSize.h"

0 comments on commit eebb3eb

Please sign in to comment.