Swansea's preparations for the new season suffered a hiccup with a 3-1 defeat at Championship club Bournemouth.