import unittest
import sys
from ctypeslib import h2xml, xml2py

class ToolchainTest(unittest.TestCase):
    if sys.platform == "win32":
        def test(self):
            h2xml.main(["h2xml", "-q",
                        "-D WIN32_LEAN_AND_MEAN",
                        "-D _UNICODE", "-D UNICODE",
                        "-c", "windows.h",
                        "-o", "_windows_gen.xml"])
            xml2py.main(["xml2py", "_windows_gen.xml", "-w", "-o", "_winapi_gen.py"])
            import _winapi_gen

if __name__ == "__main__":
    import unittest
    unittest.main()

import unittest
import sys
from ctypeslib import h2xml, xml2py

class ToolchainTest(unittest.TestCase):
    if sys.platform == "win32":
        def test_windows(self):
            h2xml.main(["h2xml", "-q",
                        "-D WIN32_LEAN_AND_MEAN",
                        "-D _UNICODE", "-D UNICODE",
                        "-c", "windows.h",
                        "-o", "_windows_gen.xml"])
            xml2py.main(["xml2py", "_windows_gen.xml", "-w", "-o", "_winapi_gen.py"])
            import _winapi_gen

    def test(self):
        h2xml.main(["h2xml", "-q",
                    "-D WIN32_LEAN_AND_MEAN",
                    "-D _UNICODE", "-D UNICODE",
                    "-c", "stdio.h",
                    "-o", "_stdio_gen.xml"])
        xml2py.main(["xml2py", "_stdio_gen.xml", "-o", "_stdio_gen.py"])
        import _stdio_gen


if __name__ == "__main__":
    import unittest
    unittest.main()

Add a test for stdio.h.
Add a test for stdio.h.

git-svn-id: ac2c3632cb6543e7ab5fafd132c7fe15057a1882@60472 6015fed2-1504-0410-9fe1-9d1591cc4771

  import unittest
  import sys
  from ctypeslib import h2xml, xml2py
  
  class ToolchainTest(unittest.TestCase):
      if sys.platform == "win32":
-         def test(self):
+         def test_windows(self):
              h2xml.main(["h2xml", "-q",
                          "-D WIN32_LEAN_AND_MEAN",
                          "-D _UNICODE", "-D UNICODE",
                          "-c", "windows.h",
                          "-o", "_windows_gen.xml"])
              xml2py.main(["xml2py", "_windows_gen.xml", "-w", "-o", "_winapi_gen.py"])
              import _winapi_gen
  
+     def test(self):
+         h2xml.main(["h2xml", "-q",
+                     "-D WIN32_LEAN_AND_MEAN",
+                     "-D _UNICODE", "-D UNICODE",
+                     "-c", "stdio.h",
+                     "-o", "_stdio_gen.xml"])
+         xml2py.main(["xml2py", "_stdio_gen.xml", "-o", "_stdio_gen.py"])
+         import _stdio_gen
+ 
+ 
  if __name__ == "__main__":
      import unittest
      unittest.main()
  
Add a test for stdio.h.
## Code Before:
import unittest
import sys
from ctypeslib import h2xml, xml2py

class ToolchainTest(unittest.TestCase):
    if sys.platform == "win32":
        def test(self):
            h2xml.main(["h2xml", "-q",
                        "-D WIN32_LEAN_AND_MEAN",
                        "-D _UNICODE", "-D UNICODE",
                        "-c", "windows.h",
                        "-o", "_windows_gen.xml"])
            xml2py.main(["xml2py", "_windows_gen.xml", "-w", "-o", "_winapi_gen.py"])
            import _winapi_gen

if __name__ == "__main__":
    import unittest
    unittest.main()

## Instruction:
Add a test for stdio.h.
## Code After:
import unittest
import sys
from ctypeslib import h2xml, xml2py

class ToolchainTest(unittest.TestCase):
    if sys.platform == "win32":
        def test_windows(self):
            h2xml.main(["h2xml", "-q",
                        "-D WIN32_LEAN_AND_MEAN",
                        "-D _UNICODE", "-D UNICODE",
                        "-c", "windows.h",
                        "-o", "_windows_gen.xml"])
            xml2py.main(["xml2py", "_windows_gen.xml", "-w", "-o", "_winapi_gen.py"])
            import _winapi_gen

    def test(self):
        h2xml.main(["h2xml", "-q",
                    "-D WIN32_LEAN_AND_MEAN",
                    "-D _UNICODE", "-D UNICODE",
                    "-c", "stdio.h",
                    "-o", "_stdio_gen.xml"])
        xml2py.main(["xml2py", "_stdio_gen.xml", "-o", "_stdio_gen.py"])
        import _stdio_gen


if __name__ == "__main__":
    import unittest
    unittest.main()
