Fix DS Comm button tests (#1591)

Mac requires the double braces
This commit is contained in:
Thad House
2019-02-09 00:07:24 -08:00
committed by Peter Johnson
parent 8a9822a96b
commit 12cb77cd7c

View File

@@ -67,9 +67,9 @@ TEST_F(DSCommPacketTest, BlankJoystickTag) {
TEST_F(DSCommPacketTest, MainJoystickTag) {
for (int i = 0; i < HAL_kMaxJoysticks; i++) {
// Just random data
std::array<uint8_t, 12> _buttons{0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1};
std::array<uint8_t, 12> _buttons{{0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1}};
std::array<uint8_t, 2> _button_bytes{0, 0};
std::array<uint8_t, 2> _button_bytes{{0, 0}};
for (int btn = 0; btn < 8; btn++) _button_bytes[1] |= _buttons[btn] << btn;
for (int btn = 8; btn < 12; btn++)
_button_bytes[0] |= _buttons[btn] << (btn - 8);