Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort includes setup_payload #714

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/setup_payload/ManualSetupPayloadGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
#ifndef _MANUAL_SETUP_PAYLOAD_GENERATOR_H_
#define _MANUAL_SETUP_PAYLOAD_GENERATOR_H_

#include <string>
#include "SetupPayload.h"

#include <core/CHIPError.h>
#include "SetupPayload.h"

#include <string>

using namespace std;
namespace chip {
Expand Down
2 changes: 1 addition & 1 deletion src/setup_payload/ManualSetupPayloadParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include "ManualSetupPayloadParser.h"

#include <iostream>
#include <vector>
#include <math.h>
#include <string>
#include <vector>

using namespace chip;
using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/setup_payload/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ libSetupPayloadTests_a_SOURCES = \
libSetupPayloadTests_adir = $(includedir)/setup_payload

dist_libSetupPayloadTests_a_HEADERS = \
TestSetupCode.h \
TestQRCode.h \
TestManualCode.h \
$(NULL)

# C/C++ preprocessor option flags that will apply to all compiled
Expand Down
10 changes: 5 additions & 5 deletions src/setup_payload/tests/TestManualCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
*
*/

#include "TestSetupCode.h"

#include <assert.h>
#include <stdio.h>
#include <unistd.h>
#include "TestManualCode.h"

#include "ManualSetupPayloadGenerator.cpp"
#include "ManualSetupPayloadParser.cpp"
#include "SetupPayload.cpp"
#include "SetupPayload.h"

#include <assert.h>
#include <stdio.h>
#include <unistd.h>

using namespace chip;

void testDecimalRepresentation_PartialPayload()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,13 @@

/**
* @file
* This file declares test entry points for CHIP setup code unit tests.
* This file declares test entry point for CHIP manual code unit tests.
*
*/

#ifndef TESTSETUPCODE_H
#define TESTSETUPCODE_H

#ifdef __cplusplus
extern "C" {
#endif
#ifndef TESTMANUALCODE_H
#define TESTMANUALCODE_H

int TestManualSetupCode(void);
int TestQuickResponseCode(void);

#ifdef __cplusplus
}
#endif

#endif // TESTSETUPCODE_H
#endif // TESTMANUALCODE_H
2 changes: 1 addition & 1 deletion src/setup_payload/tests/TestManualCodeDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
*/

#include "TestSetupCode.h"
#include "TestManualCode.h"

int main(void)
{
Expand Down
15 changes: 7 additions & 8 deletions src/setup_payload/tests/TestQRCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@
*
*/

#include "TestSetupCode.h"
#include "TestQRCode.h"

#include <assert.h>
#include <stdio.h>
#include <unistd.h>

#include <iostream>

#include "SetupPayload.cpp"
#include "Base41.cpp"
#include "QRCodeSetupPayloadGenerator.cpp"
#include "QRCodeSetupPayloadParser.cpp"
#include "SetupPayload.cpp"

#include <assert.h>
#include <iostream>
#include <stdio.h>
#include <unistd.h>

using namespace chip;
using namespace std;
Expand Down
29 changes: 29 additions & 0 deletions src/setup_payload/tests/TestQRCode.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
*
* Copyright (c) 2020 Project CHIP Authors
*
* 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
* This file declares test entry point for CHIP qr code unit tests.
*
*/

#ifndef TESTQRCODE_H
#define TESTQRCODE_H

int TestQuickResponseCode(void);

#endif // TESTQRCODE_H
2 changes: 1 addition & 1 deletion src/setup_payload/tests/TestQRCodeDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
*/

#include "TestSetupCode.h"
#include "TestQRCode.h"

int main(void)
{
Expand Down