mirror of https://github.com/ARMmbed/mbed-os.git
LoraPhy and regions unit test skeletons added
parent
b6848c4ea4
commit
445384852e
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHY.h"
|
||||
|
||||
|
||||
class my_LoRaPHY : public LoRaPHY
|
||||
{
|
||||
public:
|
||||
my_LoRaPHY(){};
|
||||
|
||||
virtual ~my_LoRaPHY(){};
|
||||
};
|
||||
|
||||
class Test_LoRaPHY : public testing::Test {
|
||||
protected:
|
||||
my_LoRaPHY *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new my_LoRaPHY();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHY, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHY")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHY.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphy/Test_LoRaPHY.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
|
||||
)
|
||||
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8 -DMBED_CONF_LORA_DUTY_CYCLE_ON_JOIN=true")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8 -DMBED_CONF_LORA_DUTY_CYCLE_ON_JOIN=true")
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYAS923.h"
|
||||
|
||||
class Test_LoRaPHYAS923 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYAS923 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYAS923();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYAS923, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYAS923")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYAS923.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYAU915.h"
|
||||
|
||||
class Test_LoRaPHYAU915 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYAU915 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYAU915();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYAU915, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYAU915")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYAU915.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
|
||||
)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_FSB_MASK=\"{0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x00FF}\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_FSB_MASK=\"{0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x00FF}\"")
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYCN470.h"
|
||||
|
||||
class Test_LoRaPHYCN470 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYCN470 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYCN470();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYCN470, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYCN470")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYCN470.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYCN779.h"
|
||||
|
||||
class Test_LoRaPHYCN779 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYCN779 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYCN779();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYCN779, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYCN779")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYCN779.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphycn779/Test_LoRaPHYCN779.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
|
||||
)
|
||||
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_FSB_MASK_CHINA=\"{0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x00FF}\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_FSB_MASK_CHINA=\"{0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x00FF}\"")
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYEU433.h"
|
||||
|
||||
class Test_LoRaPHYEU433 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYEU433 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYEU433();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYEU433, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYEU433")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYEU433.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphyeu433/Test_LoRaPHYEU433.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYEU868.h"
|
||||
|
||||
class Test_LoRaPHYEU868 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYEU868 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYEU868();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYEU868, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYEU868")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYEU868.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphyeu868/Test_LoRaPHYEU868.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYIN865.h"
|
||||
|
||||
class Test_LoRaPHYIN865 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYIN865 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYIN865();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYIN865, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYIN865")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYIN865.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphyin865/Test_LoRaPHYIN865.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYKR920.h"
|
||||
|
||||
class Test_LoRaPHYKR920 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYKR920 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYKR920();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYKR920, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYKR920")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYKR920.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "LoRaPHYUS915.h"
|
||||
|
||||
class Test_LoRaPHYUS915 : public testing::Test {
|
||||
protected:
|
||||
LoRaPHYUS915 *object;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
object = new LoRaPHYUS915();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
{
|
||||
delete object;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Test_LoRaPHYUS915, constructor)
|
||||
{
|
||||
EXPECT_TRUE(object);
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#[[
|
||||
* Copyright (c) 2018, Arm Limited and affiliates
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
]]
|
||||
|
||||
# Unit test suite name
|
||||
set(TEST_SUITE_NAME "lorawan_LoRaPHYUS915")
|
||||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYUS915.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
../features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
|
||||
)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_FSB_MASK=\"{0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x00FF}\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_FSB_MASK=\"{0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x00FF}\"")
|
Loading…
Reference in New Issue