updated Swift tests with latest API and syntax changes