From 56804de3d384d6d2b345a53e69a488b2d4587aef Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 27 Oct 2007 15:48:23 +0000 Subject: [PATCH] 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 --- src/tests/smoother-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c index 96acdd4..c0501ec 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; -- 2.7.4