diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-01-29 10:38:16 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-01-30 00:17:28 +0100 |
commit | be02472fced1b558262c6bbbc0f92f6a0c95ca70 (patch) | |
tree | ac54965baa7d2a0f13cc04ac515a5be648fed57a /bindgen-integration/cpp/Test.cc | |
parent | 3660d4d443b2c4a6620376899786b4d75aebf3a2 (diff) |
tests: Add an integration test for static arrays.
Turns out they were broken before
https://github.com/servo/rust-bindgen/issues/456.
Let's test it so it doesn't regress.
Diffstat (limited to 'bindgen-integration/cpp/Test.cc')
-rw-r--r-- | bindgen-integration/cpp/Test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bindgen-integration/cpp/Test.cc b/bindgen-integration/cpp/Test.cc index d9c13a76..fa0ff827 100644 --- a/bindgen-integration/cpp/Test.cc +++ b/bindgen-integration/cpp/Test.cc @@ -1,5 +1,12 @@ #include "Test.h" +const int Test::COUNTDOWN[] = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; +const int* Test::COUNTDOWN_PTR = Test::COUNTDOWN; + +const int* Test::countdown() { + return COUNTDOWN; +} + const char* Test::name() { return "Test"; } |