sync rostests to r44455
[reactos.git] / rostests / winetests / setupapi / devinst.c
index 1ae0720..816f66c 100644 (file)
@@ -388,7 +388,7 @@ static void testInstallClass(void)
     ret = pSetupDiInstallClassA(NULL, tmpfile, 0, NULL);
     ok(ret, "SetupDiInstallClassA failed: %08x\n", GetLastError());
 
-    ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey),
+        ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey),
      "Couldn't delete classkey\n");
 
     DeleteFile(tmpfile);
@@ -527,7 +527,7 @@ static void testCreateDeviceInfo(void)
 
                 ret = remove_device();
                 ok(ret, "Expected a device to be removed\n");
-            }
+}
         }
         else
         {
@@ -739,11 +739,11 @@ static void testCreateDeviceInterface(void)
             trace("We are most likely on Wine\n");
             devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
             devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
-        }
+    }
         else
         {
             clean_devclass_key();
-        }
+}
     }
 }
 
@@ -839,9 +839,9 @@ static void testGetDeviceInterfaceDetail(void)
                     GetLastError());
             ok(!lstrcmpiA(path, detail->DevicePath) ||
              !lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
-             detail->DevicePath);
+                    detail->DevicePath);
             /* Check SetupDiGetDeviceInterfaceDetailW */
-            ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL);
+                ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL);
             ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
              "Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError());
             ok(expectedsize == size ||
@@ -864,11 +864,11 @@ static void testGetDeviceInterfaceDetail(void)
             trace("We are most likely on Wine\n");
             devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
             devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
-        }
+    }
         else
         {
             clean_devclass_key();
-        }
+}
     }
 }
 
@@ -981,25 +981,25 @@ static void testDevRegKey(void)
         if (key != INVALID_HANDLE_VALUE)
         {
             classKeyCreated = TRUE;
-            RegCloseKey(key);
+        RegCloseKey(key);
             /* The class key should have been created */
             ok(!RegOpenKeyW(HKEY_LOCAL_MACHINE, classKey, &key),
              "Expected registry key to exist\n");
             RegCloseKey(key);
-            SetLastError(0xdeadbeef);
-            key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
-             DIREG_DRV, 0);
-            todo_wine
-            ok(key == INVALID_HANDLE_VALUE &&
+        SetLastError(0xdeadbeef);
+        key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
+         DIREG_DRV, 0);
+        todo_wine
+        ok(key == INVALID_HANDLE_VALUE &&
              (GetLastError() == ERROR_INVALID_DATA ||
              GetLastError() == ERROR_ACCESS_DENIED), /* win2k3 */
              "Expected ERROR_INVALID_DATA or ERROR_ACCESS_DENIED, got %08x\n", GetLastError());
-            key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
-             DIREG_DRV, KEY_READ);
-            ok(key != INVALID_HANDLE_VALUE, "SetupDiOpenDevRegKey failed: %08x\n",
-             GetLastError());
-            pSetupDiDestroyDeviceInfoList(set);
-        }
+        key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
+         DIREG_DRV, KEY_READ);
+        ok(key != INVALID_HANDLE_VALUE, "SetupDiOpenDevRegKey failed: %08x\n",
+         GetLastError());
+        pSetupDiDestroyDeviceInfoList(set);
+    }
         else
             classKeyCreated = FALSE;
 
@@ -1014,8 +1014,8 @@ static void testDevRegKey(void)
             /* Wine doesn't delete the information currently */
             trace("We are most likely on Wine\n");
             devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
-            devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, classKey);
-        }
+    devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, classKey);
+}
         else if (classKeyCreated)
         {
             /* There should only be a class key entry, so a simple
@@ -1107,7 +1107,7 @@ static void testRegisterAndGetDetail(void)
             todo_wine
             ok(!lstrcmpiA(path, detail->DevicePath) ||
              !lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
-             detail->DevicePath);
+                    detail->DevicePath);
             HeapFree(GetProcessHeap(), 0, detail);
         }
     }
@@ -1126,7 +1126,7 @@ static void testRegisterAndGetDetail(void)
         trace("We are most likely on Wine\n");
         devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
         devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
-    }
+}
     else
     {
         clean_devclass_key();
@@ -1234,7 +1234,7 @@ static void testDeviceRegistryPropertyA(void)
         /* Wine doesn't delete the information currently */
         trace("We are most likely on Wine\n");
         RegDeleteKeyA(HKEY_LOCAL_MACHINE, bogus);
-    }
+}
 }
 
 static void testDeviceRegistryPropertyW(void)
@@ -1340,14 +1340,14 @@ static void testDeviceRegistryPropertyW(void)
         /* Wine doesn't delete the information currently */
         trace("We are most likely on Wine\n");
         RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus);
-    }
+}
 }
 
 START_TEST(devinst)
 {
     HDEVINFO set;
 
-     init_function_pointers();
+    init_function_pointers();
 
     /* Win9x/WinMe does things totally different so we skip all the tests
      *