1use strict;
2use warnings;
3use Test::More;
4# Test static variables
5
6# this is needed to avoid false passes if was done first without 'info'
7use Inline CPP => config => force_build => 1, clean_after_build => 0;
8
9use Inline CPP => <<'END';
10class Foo {
11  public:
12    Foo()  {}
13    ~Foo() {}
14    static int get_thing() { return s_thing; }
15  private:
16    static int s_thing;
17};
18
19int Foo::s_thing = 10;
20
21END
22
23is(
24    Foo->new->get_thing, 10,
25    "Static variables within a class."
26);
27
28done_testing();
29