Browse Source

Test for jack_port_type behaviour in jack_test.cpp tool.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1471 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.63
sletz 18 years ago
parent
commit
940d44b68c
2 changed files with 18 additions and 8 deletions
  1. +1
    -1
      ChangeLog
  2. +17
    -7
      tests/jack_test.cpp

+ 1
- 1
ChangeLog View File

@@ -4,7 +4,7 @@

2007-05-04 Stephane Letz <letz@grame.fr>

* Steven Chamberlain patch to fix jack_port_type.
* Steven Chamberlain patch to fix jack_port_type. Test for jack_port_type behaviour in jack_test.cpp tool.

2007-05-03 Stephane Letz <letz@grame.fr>



+ 17
- 7
tests/jack_test.cpp View File

@@ -33,7 +33,7 @@
#include <getopt.h>
#include <math.h>
#include <assert.h>
#include <stdarg.h>
#include <stdarg.h>

#include "jack.h"
#include "transport.h"
@@ -639,6 +639,16 @@ int main (int argc, char *argv[])
printf("!!! ERROR !!! Can't register any port for the client !\n");
exit(1);
}
/**
* Test port type of the just registered port.
*
*/
if (strcmp(jack_port_type(output_port1), JACK_DEFAULT_AUDIO_TYPE) != 0) {
printf("!!! ERROR !!! jack_port_type returns an incorrect value!\n");
} else {
Log("Checking jack_port_type()... ok.\n");
}

/**
* Try to register another port with the same name...
@@ -678,7 +688,7 @@ int main (int argc, char *argv[])
printf("!!! ERROR !!! functions jack_port_set_name seems to be invalid !\n");
printf("Jack_port_name return '%s' whereas 'renamed-port#' was expected...\n");
} else {
Log("checking jack_port_set_name... ok\n");
Log("Checking jack_port_set_name()... ok\n");
jack_port_set_name (output_port1, "port");
}
} else {
@@ -973,7 +983,7 @@ int main (int argc, char *argv[])
*
*/
if (is_mine == 1) {
Log("Checking jack_port_is_mine... ok\n");
Log("Checking jack_port_is_mine()... ok\n");
} else {
printf("!!! ERROR !!! jack_port_is_mine() function seems to send non-valid datas !\n");
}
@@ -1175,7 +1185,7 @@ int main (int argc, char *argv[])

free (inports);
if (connexions1 == NULL) {
Log("checking jack_port_get_connections for external client... ok\n");
Log("checking jack_port_get_connections() for external client... ok\n");
} else {
while ((connexions1[a] != NULL) && (connexions2[a] != NULL) && (t_error == 0)) {
t_error = strcmp(connexions1[a], connexions2[a]);
@@ -1183,9 +1193,9 @@ int main (int argc, char *argv[])
}
}
if (t_error == 0) {
Log("Checking jack_port_get_connections Vs jack_port_get_all_connections on PHY port... ok\n");
Log("Checking jack_port_get_connections() Vs jack_port_get_all_connections() on PHY port... ok\n");
} else {
printf("!!! ERROR !!! while checking jack_port_get_connections Vs jack_port_get_all_connections on PHY port...\n");
printf("!!! ERROR !!! while checking jack_port_get_connections() Vs jack_port_get_all_connections() on PHY port...\n");
}

/**
@@ -1444,7 +1454,7 @@ int main (int argc, char *argv[])
printf("!!! WARNING !!! port_name return something while the port have been unregistered !\n");
printf("!!! Name of unregistered port : %s !\n", jack_port_name(output_port1b));
} else {
Log("checking port_name() with a non valid port... ok\n");
Log("Checking jack_port_name() with a non valid port... ok\n");
}

if (jack_port_set_name(output_port1b, "new_name") == 0 ) {


Loading…
Cancel
Save