Skip to content

Commit

Permalink
sort includes setup_payload (#714)
Browse files Browse the repository at this point in the history
* sort includes setup_payload

* fixup
  • Loading branch information
Rob Walker authored May 15, 2020
1 parent d0789c9 commit 65233e8
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 32 deletions.
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

0 comments on commit 65233e8

Please sign in to comment.