aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-03-07 10:43:16 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-03-07 10:43:16 +0000
commit8166385818520755a05d1fa8392aab2ec2c21796 (patch)
treeae76e8f2402680ad731e74911a7bf0e104bbc4b1
parent985548c51eefe40f8dbccbedb35b1736b7d5d40f (diff)
downloadusdx-8166385818520755a05d1fa8392aab2ec2c21796.tar.gz
usdx-8166385818520755a05d1fa8392aab2ec2c21796.tar.xz
usdx-8166385818520755a05d1fa8392aab2ec2c21796.zip
bug fix and more tests.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2181 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--test/TestPortAudioDevice.pas29
1 files changed, 26 insertions, 3 deletions
diff --git a/test/TestPortAudioDevice.pas b/test/TestPortAudioDevice.pas
index 3b6e1cd4..10c49034 100644
--- a/test/TestPortAudioDevice.pas
+++ b/test/TestPortAudioDevice.pas
@@ -35,7 +35,8 @@ program TestPortAudioDevice;
{$ENDIF}
uses
- PortAudio in '../../src/lib/portaudio/portaudio.pas';
+ SysUtils,
+ PortAudio in '../src/lib/portaudio/portaudio.pas';
const
paDefaultApi = -1;
@@ -107,17 +108,39 @@ begin
writeln ('*** Test of Pa_Initialize and Pa_Terminate ***');
PaError := Pa_Initialize;
if PaError = paNoError then
- writeln ('Pa_Initialize: NoError')
+ writeln ('Pa_Initialize: No error')
else
writeln ('Pa_Initialize: Error No ', PaError);
PaError := Pa_Terminate;
if PaError = paNoError then
- writeln ('Pa_Terminate: NoError')
+ writeln ('Pa_Terminate: No error')
else
writeln ('Pa_Terminate: Error No: ', PaError);
writeln;
+ writeln ('*** Test of Pa_GetVersion and Pa_GetVersionText ***');
+ PaError := Pa_Initialize;
+ writeln ('Pa_GetVersion: ', Pa_GetVersion);
+ writeln ('Pa_GetVersionText: ', Pa_GetVersionText);
+ PaError := Pa_Terminate;
+ writeln;
+
+ writeln ('*** Test of Pa_GetErrorText ***');
+ PaError := Pa_Initialize;
+ writeln ('paNoError (0): ', Pa_GetErrorText(PaError));
+ writeln;
+ writeln ('Code Text');
+ writeln ('------------------------------------');
+ i := paNotInitialized;
+ repeat
+ writeln (i:6, ' ', Pa_GetErrorText(i));
+ i := succ(i);
+ until SameText(Pa_GetErrorText(i), 'Invalid error code') or (i = paNotInitialized + 100);
+ writeln (i:6, ' ', Pa_GetErrorText(i));
+ PaError := Pa_Terminate;
+ writeln;
+
writeln ('*** Test of GetPreferredApiIndex ***');
PaError := Pa_Initialize;
paApiIndex := GetPreferredApiIndex();