From aeb798e285d9fedad4ec5a6bf45be771104c5f3b Mon Sep 17 00:00:00 2001 From: Daniel Paulus Date: Sun, 23 Jul 2023 23:04:38 +0200 Subject: [PATCH] add example config, a testcase to use in the debugger and decoder code for XCTTestIdentifiers --- ios/nskeyedarchiver/archiver_test.go | 15 +------------ .../xctestconfig-with-test-to-run.plist | Bin 0 -> 4968 bytes ios/nskeyedarchiver/objectivec_classes.go | 21 ++++++++++++++++++ 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 ios/nskeyedarchiver/fixtures/xctestconfig-with-test-to-run.plist diff --git a/ios/nskeyedarchiver/archiver_test.go b/ios/nskeyedarchiver/archiver_test.go index 0331f450..a05be85f 100644 --- a/ios/nskeyedarchiver/archiver_test.go +++ b/ios/nskeyedarchiver/archiver_test.go @@ -10,7 +10,6 @@ import ( "github.com/danielpaulus/go-ios/ios/nskeyedarchiver" archiver "github.com/danielpaulus/go-ios/ios/nskeyedarchiver" - "github.com/google/uuid" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" ) @@ -35,20 +34,8 @@ func TestArchiveSlice(t *testing.T) { // TODO currently only partially decoding XCTestConfig is supported, fix later func TestXCTestconfig(t *testing.T) { - uuid := uuid.New() - config := nskeyedarchiver.NewXCTestConfiguration("productmodulename", uuid, "targetAppBundle", "targetAppPath", "testBundleUrl") - result, err := nskeyedarchiver.ArchiveXML(config) - if err != nil { - log.Error(err) - t.Fatal() - } - print(result) - log.Info(uuid.String()) - res, err := nskeyedarchiver.Unarchive([]byte(result)) - assert.NoError(t, err) - log.Info(res) - nskeyedBytes, err := ioutil.ReadFile("fixtures/xctestconfiguration.bin") + nskeyedBytes, err := ioutil.ReadFile("fixtures/xctestconfig-with-test-to-run.plist") if err != nil { log.Error(err) t.Fatal() diff --git a/ios/nskeyedarchiver/fixtures/xctestconfig-with-test-to-run.plist b/ios/nskeyedarchiver/fixtures/xctestconfig-with-test-to-run.plist new file mode 100644 index 0000000000000000000000000000000000000000..b447d69126c5d28388e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