From 602896277c76298bcbc152312d915dec306eda27 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Mon, 21 Jun 2010 13:03:24 +0100 Subject: Change np_state_write_string() to not be a pointer --- lib/tests/test_utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/tests/test_utils.c') diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c index 6e04bfc7..e90d4fb5 100644 --- a/lib/tests/test_utils.c +++ b/lib/tests/test_utils.c @@ -355,7 +355,7 @@ main (int argc, char **argv) unlink("var/generated"); temp_state_key->_filename="var/generated"; current_time=1234567890; - np_state_write_string(¤t_time, "String to read"); + np_state_write_string(current_time, "String to read"); ok(system("cmp var/generated var/statefile")==0, "Generated file same as expected"); @@ -365,20 +365,20 @@ main (int argc, char **argv) unlink("var/generated_directory"); temp_state_key->_filename="var/generated_directory/statefile"; current_time=1234567890; - np_state_write_string(¤t_time, "String to read"); + np_state_write_string(current_time, "String to read"); ok(system("cmp var/generated_directory/statefile var/statefile")==0, "Have created directory"); /* This test to check cannot write to dir - can't automate yet */ /* unlink("var/generated_bad_dir"); mkdir("var/generated_bad_dir", S_IRUSR); - np_state_write_string(¤t_time, "String to read"); + np_state_write_string(current_time, "String to read"); */ temp_state_key->_filename="var/generated"; time(¤t_time); - np_state_write_string(NULL, "String to read"); + np_state_write_string(0, "String to read"); temp_state_data = np_state_read(temp_state_key); /* Check time is set to current_time */ ok(system("cmp var/generated var/statefile > /dev/null")!=0, "Generated file should be different this time"); @@ -388,7 +388,7 @@ main (int argc, char **argv) /* Don't know how to automatically test this. Need to be able to redefine die and catch the error */ /* temp_state_key->_filename="/dev/do/not/expect/to/be/able/to/write"; - np_state_write_string(NULL, "Bad file"); + np_state_write_string(0, "Bad file"); */ -- cgit v1.2.3-74-g34f1