24{
27 BYTE capacity_flags, expected_capacity_flags;
28
29 if (0)
31
32 memset(&ps, 0x23,
sizeof(ps));
35
37 {
38 skip(
"GetSystemPowerStatus not implemented or not working\n");
39 return;
40 }
42 {
43 trace(
"battery detected\n");
44 expected_capacity_flags = 0;
51 capacity_flags = (ps.
BatteryFlag & ~BATTERY_FLAG_CHARGING);
52 ok(capacity_flags == expected_capacity_flags,
53 "expected %u%%-charged battery to have capacity flags 0x%02x, got 0x%02x\n",
56 "expected BatteryLifeTime %lu to be less than or equal to BatteryFullLifeTime %lu\n",
59 {
61 "expected BatteryLifeTime to be -1 when charging, got %lu\n", ps.
BatteryLifeTime);
64 }
65 }
66 else
67 {
68 trace(
"no battery detected\n");
70 "expected ACLineStatus to be 1, got %u\n", ps.
ACLineStatus);
77 }
78}
BOOL WINAPI GetSystemPowerStatus(IN LPSYSTEM_POWER_STATUS PowerStatus)
DWORD BatteryFullLifeTime
#define BATTERY_FLAG_CHARGING
#define BATTERY_LIFE_UNKNOWN
#define BATTERY_FLAG_NO_BATTERY
#define BATTERY_FLAG_CRITICAL
#define BATTERY_FLAG_UNKNOWN
#define BATTERY_FLAG_HIGH
#define BATTERY_PERCENTAGE_UNKNOWN