summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-08-26 09:42:08 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-08-26 17:32:19 +0000
commita1035cf81494c3ab22c49b01788ca8ad933c5eb0 (patch)
treefee86f8751cc93eca9702fd50c3380483ff0f86a /other
parent64ddb7fff21e8cfcd197ba31bbb08ee6d3964c54 (diff)
Add some tests for `ping_array`.
No timeout test here yet, because we don't yet have the ability to manipulate time at will, so we would have to actually sleep.
Diffstat (limited to 'other')
-rwxr-xr-xother/astyle/format-source16
1 files changed, 13 insertions, 3 deletions
diff --git a/other/astyle/format-source b/other/astyle/format-source
index 5e139d89..550bcf07 100755
--- a/other/astyle/format-source
+++ b/other/astyle/format-source
@@ -49,15 +49,25 @@ if grep '<unresolved>' */*.h; then
49 exit 1 49 exit 1
50fi 50fi
51 51
52CC_SOURCES=`find . '(' -name '*.cc' ')'`
53CC_SOURCES="$CC_SOURCES toxcore/ping_array.c"
54
55for bin in clang-format-6.0 clang-format-5.0 clang-format; do
56 if which "$bin"; then
57 "$bin" -i -style='{BasedOnStyle: Google, ColumnLimit: 100}' $CC_SOURCES
58 break
59 fi
60done
61
52FIND="find ." 62FIND="find ."
53FIND="$FIND '(' -name '*.[ch]' -or -name '*.cpp' ')'" 63FIND="$FIND '(' -name '*.[ch]' ')'"
54FIND="$FIND -and -not -name '*.api.h'" 64FIND="$FIND -and -not -name '*.api.h'"
55FIND="$FIND -and -not -wholename './super_donators/*'" 65FIND="$FIND -and -not -wholename './super_donators/*'"
56FIND="$FIND -and -not -wholename './third_party/*'" 66FIND="$FIND -and -not -wholename './third_party/*'"
57FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'" 67FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'"
58 68
59SOURCES=`eval "$FIND"` 69C_SOURCES=`eval "$FIND"`
60 70
61$ASTYLE -n --options=other/astyle/astylerc $SOURCES 71$ASTYLE -n --options=other/astyle/astylerc $C_SOURCES
62 72
63git diff --exit-code 73git diff --exit-code