diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-10-27 15:48:23 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-10-27 15:48:23 +0000 |
commit | 56804de3d384d6d2b345a53e69a488b2d4587aef (patch) | |
tree | 0c3b0500024ac291f0e9cf518ba4a665b547b21d | |
parent | 581e7f18023682c05cb172ad06ced0c25d5e0c0f (diff) |
minor fixups, to make the test more deterministic
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1959 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/tests/smoother-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c index 96acdd40..c0501ecc 100644 --- a/src/tests/smoother-test.c +++ b/src/tests/smoother-test.c @@ -45,12 +45,17 @@ int main(int argc, char*argv[]) { int msec[200]; + srand(0); + for (m = 0, u = 0; u < PA_ELEMENTSOF(msec)-2; u+= 2) { msec[u] = m+1; msec[u+1] = m + rand() % 2000 - 1000; m += rand() % 100; + + if (msec[u+1] < 0) + msec[u+1] = 0; } msec[PA_ELEMENTSOF(msec)-2] = 0; |