diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-08-26 09:42:08 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-26 17:32:19 +0000 |
commit | a1035cf81494c3ab22c49b01788ca8ad933c5eb0 (patch) | |
tree | fee86f8751cc93eca9702fd50c3380483ff0f86a /other | |
parent | 64ddb7fff21e8cfcd197ba31bbb08ee6d3964c54 (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-x | other/astyle/format-source | 16 |
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 |
50 | fi | 50 | fi |
51 | 51 | ||
52 | CC_SOURCES=`find . '(' -name '*.cc' ')'` | ||
53 | CC_SOURCES="$CC_SOURCES toxcore/ping_array.c" | ||
54 | |||
55 | for 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 | ||
60 | done | ||
61 | |||
52 | FIND="find ." | 62 | FIND="find ." |
53 | FIND="$FIND '(' -name '*.[ch]' -or -name '*.cpp' ')'" | 63 | FIND="$FIND '(' -name '*.[ch]' ')'" |
54 | FIND="$FIND -and -not -name '*.api.h'" | 64 | FIND="$FIND -and -not -name '*.api.h'" |
55 | FIND="$FIND -and -not -wholename './super_donators/*'" | 65 | FIND="$FIND -and -not -wholename './super_donators/*'" |
56 | FIND="$FIND -and -not -wholename './third_party/*'" | 66 | FIND="$FIND -and -not -wholename './third_party/*'" |
57 | FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'" | 67 | FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'" |
58 | 68 | ||
59 | SOURCES=`eval "$FIND"` | 69 | C_SOURCES=`eval "$FIND"` |
60 | 70 | ||
61 | $ASTYLE -n --options=other/astyle/astylerc $SOURCES | 71 | $ASTYLE -n --options=other/astyle/astylerc $C_SOURCES |
62 | 72 | ||
63 | git diff --exit-code | 73 | git diff --exit-code |