diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-10-01 12:33:24 +0200 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-10-01 15:29:38 +0200 |
| commit | 462c9a1cd06b5ef9af7e348eef6a27584b98eff2 (patch) | |
| tree | 0a99e0b9e64d377091a85d880b0ea9f03aaa027b /tests | |
| parent | b5fcbc645576cd953a4b23ce804ea503b57eec4a (diff) | |
| download | lasso-462c9a1cd06b5ef9af7e348eef6a27584b98eff2.tar.gz lasso-462c9a1cd06b5ef9af7e348eef6a27584b98eff2.tar.xz lasso-462c9a1cd06b5ef9af7e348eef6a27584b98eff2.zip | |
[Core] replace all use of g_strcmp0 by lasso_strisequal and lasso_strisnotequal
Too much human errors with strcmp kind of functions. Also change name os
lasso_is_empty_string to lasso_strisempty.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/login_tests.c | 4 | ||||
| -rw-r--r-- | tests/login_tests_saml2.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/login_tests.c b/tests/login_tests.c index 54a2d554..43718620 100644 --- a/tests/login_tests.c +++ b/tests/login_tests.c @@ -196,7 +196,7 @@ START_TEST(test02_serviceProviderLogin) "lasso_login_must_ask_for_consent() should be FALSE"); fail_unless(idpLoginContext->parent.msg_relayState != NULL, "lasso_login_process_authn_request_msg should restore the RelayState parameter"); - fail_unless(g_strcmp0(idpLoginContext->parent.msg_relayState, relayState) == 0, + fail_unless(lasso_strisequal(idpLoginContext->parent.msg_relayState,relayState), "lasso_login_process_authn_request_msg should restore the same RelayState thant sent in the request"); rc = lasso_login_validate_request_msg(idpLoginContext, 1, /* authentication_result */ @@ -242,7 +242,7 @@ START_TEST(test02_serviceProviderLogin) LASSO_HTTP_METHOD_REDIRECT); fail_unless(spLoginContext->parent.msg_relayState != NULL, "lasso_login_init_request should restore the RelayState parameter"); - fail_unless(g_strcmp0(spLoginContext->parent.msg_relayState, relayState) == 0, + fail_unless(lasso_strisequal(spLoginContext->parent.msg_relayState,relayState), "lasso_login_init_request should restore the same RelayState thant sent in the request"); fail_unless(rc == 0, "lasso_login_init_request failed"); rc = lasso_login_build_request_msg(spLoginContext); diff --git a/tests/login_tests_saml2.c b/tests/login_tests_saml2.c index 7f026f2c..0864ec17 100644 --- a/tests/login_tests_saml2.c +++ b/tests/login_tests_saml2.c @@ -197,7 +197,7 @@ START_TEST(test02_saml2_serviceProviderLogin) check_equals(idpLoginContext->protocolProfile, LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_ART); check_false(lasso_login_must_ask_for_consent(idpLoginContext)); check_not_null(idpLoginContext->parent.msg_relayState); - check_equals(g_strcmp0(idpLoginContext->parent.msg_relayState, relayState), 0); + check_equals(lasso_strisnotequal(idpLoginContext->parent.msg_relayState,relayState), 0); check_good_rc(lasso_login_validate_request_msg(idpLoginContext, 1, /* authentication_result */ 0 /* is_consent_obtained */ @@ -239,7 +239,7 @@ START_TEST(test02_saml2_serviceProviderLogin) responseQuery, LASSO_HTTP_METHOD_ARTIFACT_GET)); check_not_null(spLoginContext->parent.msg_relayState); - check_equals(g_strcmp0(spLoginContext->parent.msg_relayState, relayState), 0); + check_equals(lasso_strisnotequal(spLoginContext->parent.msg_relayState,relayState), 0); check_good_rc(lasso_login_build_request_msg(spLoginContext)); soapRequestMsg = LASSO_PROFILE(spLoginContext)->msg_body; check_not_null(soapRequestMsg); @@ -543,7 +543,7 @@ START_TEST(test04_sso_then_slo_soap) check_equals(idpLoginContext->protocolProfile, LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_ART); check_false(lasso_login_must_ask_for_consent(idpLoginContext)); check_not_null(idpLoginContext->parent.msg_relayState); - check_equals(g_strcmp0(idpLoginContext->parent.msg_relayState, relayState), 0); + check_equals(lasso_strisnotequal(idpLoginContext->parent.msg_relayState,relayState), 0); check_good_rc(lasso_login_validate_request_msg(idpLoginContext, 1, /* authentication_result */ 0 /* is_consent_obtained */ @@ -585,7 +585,7 @@ START_TEST(test04_sso_then_slo_soap) responseQuery, LASSO_HTTP_METHOD_ARTIFACT_GET)); check_not_null(spLoginContext->parent.msg_relayState); - check_equals(g_strcmp0(spLoginContext->parent.msg_relayState, relayState), 0); + check_equals(lasso_strisnotequal(spLoginContext->parent.msg_relayState,relayState), 0); check_good_rc(lasso_login_build_request_msg(spLoginContext)); soapRequestMsg = LASSO_PROFILE(spLoginContext)->msg_body; check_not_null(soapRequestMsg); |
