Take a USB3 device, plug it in with the cable, and then go to System Profiler (Apple Menu -> About this Mac -> System Profiler). Look for the device, and check the speed. If it says 480MB/s it's a USB 2 cable, if it says 5GB/s, 10GB/s or 20GB/s then it's a USB3 cable.
I assume there's a way to do the same thing on Windows and Linux.
Coconut battery shows how much power your battery is charging with. I've only used this to compare power supplies, but I don't see why it shouldn't work with cables as well. Of course that only works when the battery is empty enough to actually fast charge.
Take a USB3 device, plug it in with the cable, and then go to System Profiler (Apple Menu -> About this Mac -> System Profiler). Look for the device, and check the speed. If it says 480MB/s it's a USB 2 cable, if it says 5GB/s, 10GB/s or 20GB/s then it's a USB3 cable.
I assume there's a way to do the same thing on Windows and Linux.