Skip to content

Commit

Permalink
Merge pull request #63989 from timothyqiu/vs2017
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Aug 6, 2022
2 parents 072da08 + eb176b1 commit 3b17447
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions main/tests/test_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,24 @@ class Fixture {
struct DataEntry {
Theme::DataType type;
Variant value;
} const valid_data[Theme::DATA_TYPE_MAX] = {
} valid_data[Theme::DATA_TYPE_MAX] = {
{ Theme::DATA_TYPE_COLOR, Color() },
{ Theme::DATA_TYPE_CONSTANT, 42 },
{ Theme::DATA_TYPE_FONT, Ref<Font>(memnew(BitmapFont)) },
{ Theme::DATA_TYPE_ICON, Ref<Texture>(memnew(ImageTexture)) },
{ Theme::DATA_TYPE_STYLEBOX, Ref<StyleBox>(memnew(StyleBoxFlat)) },
{ Theme::DATA_TYPE_FONT, Variant() },
{ Theme::DATA_TYPE_ICON, Variant() },
{ Theme::DATA_TYPE_STYLEBOX, Variant() },
};

const StringName valid_item_name = "valid_item_name";
const StringName valid_type_name = "ValidTypeName";

// Part of `valid_data` initialization is moved here so that it compiles in Visual Studio 2017.
// See issue #63975.
Fixture() {
valid_data[Theme::DATA_TYPE_FONT].value = Ref<Font>(memnew(BitmapFont));
valid_data[Theme::DATA_TYPE_ICON].value = Ref<Texture>(memnew(ImageTexture));
valid_data[Theme::DATA_TYPE_STYLEBOX].value = Ref<StyleBox>(memnew(StyleBoxFlat));
}
};

bool test_good_theme_type_names() {
Expand Down

0 comments on commit 3b17447

Please sign in to comment.