+++ /dev/null
-/*
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-/*
- * @file test_algo-param.cpp
- * @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
- * @version 1.0
- */
-
-#include <string>
-#include <memory>
-#include <ckm/ckm-type.h>
-#include <ckm/ckm-error.h>
-#include <dpl/test/test_runner.h>
-
-namespace {
-unsigned long long LOOONG_INT = 0xffffffffffffffff;
-const std::string TEXT("dasfagfshgrethtrtregsdgsgsdgserhse");
-const CKM::RawBuffer BUFFER(TEXT.begin(), TEXT.end());
-} // namespace anonymous
-
-RUNNER_TEST_GROUP_INIT(ALGO_PARAM_TEST)
-
-RUNNER_TEST(TAP_0010_IntParam) {
- CKM::BaseParamPtr bp = CKM::IntParam::create(LOOONG_INT);
-
- unsigned long long integer = 0;
- CKM::RawBuffer buffer;
- RUNNER_ASSERT_MSG(CKM_API_SUCCESS == bp->getInt(integer), "Integer extraction failed");
- RUNNER_ASSERT_MSG(integer == LOOONG_INT, "Unexpected integer value: " << integer);
- RUNNER_ASSERT_MSG(CKM_API_ERROR_INVALID_FORMAT == bp->getBuffer(buffer),
- "Buffer extraction should fail");
-}
-
-RUNNER_TEST(TAP_0020_BufferParam) {
- CKM::BaseParamPtr bp = CKM::BufferParam::create(BUFFER);
-
- unsigned long long integer = 0;
- CKM::RawBuffer buffer;
- RUNNER_ASSERT_MSG(CKM_API_SUCCESS == bp->getBuffer(buffer), "Buffer extraction failed");
- RUNNER_ASSERT_MSG(buffer == BUFFER, "Unexpected buffer value");
- RUNNER_ASSERT_MSG(CKM_API_ERROR_INVALID_FORMAT == bp->getInt(integer),
- "Integer extraction should fail");
-}
-