Skip to content

Commit

Permalink
Pull out shared assertions #15656
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Richter committed Mar 14, 2017
1 parent a2338c6 commit e5668a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
13 changes: 13 additions & 0 deletions test/tests/common-assertions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env false
# this script is intended to be sourced by other scripts, not run directly

#Copyright 2017 PreEmptive Solutions, LLC
#See LICENSE.txt for licensing information

assertDeobfuscatedCrashdump() {
verify grep -- '-\[BSClassP doSomethingP:]' "$1"
verify grep -- '-\[BSClassO doSomethingO:]' "$1"
verify grep -- '+\[BSClassN doSomethingInClassN:]' "$1"
verify grep -- '-\[BSClassM doSomethingM:]' "$1"
verify grep -- '-\[ViewController justGoAction:]' "$1"
}
8 changes: 1 addition & 7 deletions test/tests/test-post-obfuscation-behavior.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ assertSymbolicatedCrashdump() {
verifyFails test grep -- '-\[ViewController justGoAction:]' "$1"
}

assertDeobfuscatedCrashdump() {
verify grep -- '-\[BSClassP doSomethingP:]' "$1"
verify grep -- '-\[BSClassO doSomethingO:]' "$1"
verify grep -- '+\[BSClassN doSomethingInClassN:]' "$1"
verify grep -- '-\[BSClassM doSomethingM:]' "$1"
verify grep -- '-\[ViewController justGoAction:]' "$1"
}
. "${testRoot}/tests/common-assertions.sh"

input=symbolicated.crash
output=de-obfuscated.crash
Expand Down

0 comments on commit e5668a3

Please sign in to comment.