From 553ef6ee700112cf477741f3bd5bf8bad1b486ad Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Fri, 20 Sep 2013 10:40:03 +0200 Subject: [PATCH] More tests on maxosx system profiler output --- .../app/macosx/SystemProfilerParserTest.java | 10 ++ .../app/macosx/system_profiler_output3.txt | 107 ++++++++++++++++++ .../app/macosx/system_profiler_output4.txt | 94 +++++++++++++++ 3 files changed, 211 insertions(+) create mode 100644 app/test/processing/app/macosx/system_profiler_output3.txt create mode 100644 app/test/processing/app/macosx/system_profiler_output4.txt diff --git a/app/test/processing/app/macosx/SystemProfilerParserTest.java b/app/test/processing/app/macosx/SystemProfilerParserTest.java index ce756d855..63a2e1fac 100644 --- a/app/test/processing/app/macosx/SystemProfilerParserTest.java +++ b/app/test/processing/app/macosx/SystemProfilerParserTest.java @@ -18,5 +18,15 @@ public class SystemProfilerParserTest { assertEquals("0X2341_0X8036", new SystemProfilerParser().extractVIDAndPID(output, "/dev/cu.usbmodemfd131")); assertEquals("0X2341_0X8036", new SystemProfilerParser().extractVIDAndPID(output, "/dev/tty.usbmodemfd131")); + + output = TestHelper.inputStreamToString(SystemProfilerParserTest.class.getResourceAsStream("system_profiler_output3.txt")); + + assertEquals("0X2341_0X8041", new SystemProfilerParser().extractVIDAndPID(output, "/dev/cu.usbmodemfd121")); + assertEquals("0X2341_0X8041", new SystemProfilerParser().extractVIDAndPID(output, "/dev/tty.usbmodemfd121")); + + output = TestHelper.inputStreamToString(SystemProfilerParserTest.class.getResourceAsStream("system_profiler_output4.txt")); + + assertEquals("0X2341_0X0041", new SystemProfilerParser().extractVIDAndPID(output, "/dev/cu.usbmodem04101")); + assertEquals("0X2341_0X0041", new SystemProfilerParser().extractVIDAndPID(output, "/dev/tty.usbmodem04101")); } } diff --git a/app/test/processing/app/macosx/system_profiler_output3.txt b/app/test/processing/app/macosx/system_profiler_output3.txt new file mode 100644 index 000000000..1607c75ea --- /dev/null +++ b/app/test/processing/app/macosx/system_profiler_output3.txt @@ -0,0 +1,107 @@ +USB: + + USB High-Speed Bus: + + Host Controller Location: Built-in USB + Host Controller Driver: AppleUSBEHCI + PCI Device ID: 0x1c2d + PCI Revision ID: 0x0005 + PCI Vendor ID: 0x8086 + Bus Number: 0xfa + + FaceTime HD Camera (Built-in): + + Product ID: 0x8509 + Vendor ID: 0x05ac (Apple Inc.) + Version: 5,16 + Serial Number: CC2B8Q0794DG6LL0 + Speed: Up to 480 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0xfa200000 / 3 + Current Available (mA): 500 + Current Required (mA): 500 + + Hub: + + Product ID: 0x2513 + Vendor ID: 0x0424 (SMSC) + Version: b.b3 + Speed: Up to 480 Mb/sec + Location ID: 0xfa100000 / 2 + Current Available (mA): 500 + Current Required (mA): 2 + + BRCM2070 Hub: + + Product ID: 0x4500 + Vendor ID: 0x0a5c (Broadcom Corp.) + Version: 1,00 + Speed: Up to 12 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0xfa110000 / 5 + Current Available (mA): 500 + Current Required (mA): 94 + + Bluetooth USB Host Controller: + + Product ID: 0x821a + Vendor ID: 0x05ac (Apple Inc.) + Version: 0,37 + Speed: Up to 12 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0xfa113000 / 7 + Current Available (mA): 500 + Current Required (mA): 0 + + Apple Internal Keyboard / Trackpad: + + Product ID: 0x0253 + Vendor ID: 0x05ac (Apple Inc.) + Version: 1,18 + Speed: Up to 12 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0xfa120000 / 4 + Current Available (mA): 500 + Current Required (mA): 40 + + USB High-Speed Bus: + + Host Controller Location: Built-in USB + Host Controller Driver: AppleUSBEHCI + PCI Device ID: 0x1c26 + PCI Revision ID: 0x0005 + PCI Vendor ID: 0x8086 + Bus Number: 0xfd + + Hub: + + Product ID: 0x2513 + Vendor ID: 0x0424 (SMSC) + Version: b.b3 + Speed: Up to 480 Mb/sec + Location ID: 0xfd100000 / 2 + Current Available (mA): 500 + Current Required (mA): 2 + + Arduino Yun: + + Product ID: 0x8041 + Vendor ID: 0x2341 + Version: 1,00 + Speed: Up to 12 Mb/sec + Manufacturer: Arduino LLC + Location ID: 0xfd120000 / 4 + Current Available (mA): 500 + Current Required (mA): 500 + + IR Receiver: + + Product ID: 0x8242 + Vendor ID: 0x05ac (Apple Inc.) + Version: 0,16 + Speed: Up to 1.5 Mb/sec + Manufacturer: Apple Computer, Inc. + Location ID: 0xfd110000 / 3 + Current Available (mA): 500 + Current Required (mA): 100 + diff --git a/app/test/processing/app/macosx/system_profiler_output4.txt b/app/test/processing/app/macosx/system_profiler_output4.txt new file mode 100644 index 000000000..ff1177a7c --- /dev/null +++ b/app/test/processing/app/macosx/system_profiler_output4.txt @@ -0,0 +1,94 @@ +USB: + + USB Hi-Speed Bus: + + Host Controller Location: Built-in USB + Host Controller Driver: AppleUSBEHCI + PCI Device ID: 0x0aa9 + PCI Revision ID: 0x00b1 + PCI Vendor ID: 0x10de + Bus Number: 0x26 + + USB Hi-Speed Bus: + + Host Controller Location: Built-in USB + Host Controller Driver: AppleUSBEHCI + PCI Device ID: 0x0aa6 + PCI Revision ID: 0x00b1 + PCI Vendor ID: 0x10de + Bus Number: 0x24 + + Built-in iSight: + + Product ID: 0x8507 + Vendor ID: 0x05ac (Apple Inc.) + Version: 4,41 + Serial Number: 8JA34290MAKP3A00 + Speed: Up to 480 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0x24400000 / 2 + Current Available (mA): 500 + Current Required (mA): 500 + + USB Bus: + + Host Controller Location: Built-in USB + Host Controller Driver: AppleUSBOHCI + PCI Device ID: 0x0aa7 + PCI Revision ID: 0x00b1 + PCI Vendor ID: 0x10de + Bus Number: 0x06 + + BRCM2070 Hub: + + Product ID: 0x4500 + Vendor ID: 0x0a5c (Broadcom Corp.) + Version: 1,00 + Speed: Up to 12 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0x06100000 / 2 + Current Available (mA): 500 + Current Required (mA): 94 + + Bluetooth USB Host Controller: + + Product ID: 0x8218 + Vendor ID: 0x05ac (Apple Inc.) + Version: 0,41 + Speed: Up to 12 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0x06130000 / 3 + Current Available (mA): 500 + Current Required (mA): 0 + + USB Bus: + + Host Controller Location: Built-in USB + Host Controller Driver: AppleUSBOHCI + PCI Device ID: 0x0aa5 + PCI Revision ID: 0x00b1 + PCI Vendor ID: 0x10de + Bus Number: 0x04 + + Arduino Yun : + + Product ID: 0x0041 + Vendor ID: 0x2341 + Version: 0,01 + Speed: Up to 12 Mb/sec + Manufacturer: Arduino LLC + Location ID: 0x04100000 / 3 + Current Available (mA): 500 + Current Required (mA): 100 + + Apple Internal Keyboard / Trackpad: + + Product ID: 0x0237 + Vendor ID: 0x05ac (Apple Inc.) + Version: 0,81 + Speed: Up to 12 Mb/sec + Manufacturer: Apple Inc. + Location ID: 0x04600000 / 2 + Current Available (mA): 500 + Current Required (mA): 40 +