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

remove parson from main dir and only used in test dirs #2163

Merged
merged 1 commit into from
Mar 10, 2025
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
3 changes: 0 additions & 3 deletions bugsnag-plugin-android-ndk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"dependencies": {
"kgabis/parson": "0.0.0"
},
"development": {
"silentbicycle/greatest": "v1.2.1"
}
Expand Down
1 change: 0 additions & 1 deletion bugsnag-plugin-android-ndk/src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ add_library( # Specifies the name of the library.
jni/utils/string.c
jni/utils/threads.c
jni/utils/memory.c
jni/deps/parson/parson.c
)

include_directories(
Expand Down
1 change: 1 addition & 0 deletions bugsnag-plugin-android-ndk/src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ add_library(bugsnag-ndk-test SHARED
cpp/test_featureflags.c
cpp/test_bsg_event.c
cpp/UnwindTest.cpp
cpp/parson/parson.h
)
target_link_libraries(bugsnag-ndk-test bugsnag-ndk)
2 changes: 1 addition & 1 deletion bugsnag-plugin-android-ndk/src/test/cpp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define GREATEST_FPRINTF(ignore, fmt, ...) \
__android_log_print(ANDROID_LOG_INFO, "BugsnagNDKTest", fmt, ##__VA_ARGS__)

#include "parson/parson.h"
#include <greatest/greatest.h>
#include <parson/parson.h>

#include "test_bsg_event.h"
#include "test_serializer.h"
Expand Down
12 changes: 0 additions & 12 deletions bugsnag-plugin-android-ndk/src/test/cpp/test_serializer.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#include <utils/string.h>
#include "test_serializer.h"

enum greatest_test_res validate_serialized_json(const test_case *test_case,
JSON_Value *event_val) {
// convert to string
char *serialized_string = json_serialize_to_string(event_val);
json_value_free(event_val);

// validate structure
char *expected = test_case->expected_json;
ASSERT_STR_EQ(expected, serialized_string);
PASS();
}

void loadUserTestCase(bugsnag_event *event) {
bugsnag_user *user = &event->user;
strcpy(user->name, "Fenton");
Expand Down
4 changes: 1 addition & 3 deletions bugsnag-plugin-android-ndk/src/test/cpp/test_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdlib.h>

#include <parson/parson.h>
#include "parson/parson.h"

#include <utils/serializer.h>

Expand All @@ -12,8 +12,6 @@ typedef struct {
char *expected_json;
} test_case;

enum greatest_test_res validate_serialized_json(const test_case *test_case,
JSON_Value *event_val);
void loadUserTestCase(bugsnag_event *event);
void loadAppTestCase(bugsnag_event *event);
void loadAppMetadataTestCase(bugsnag_event *event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <stdlib.h>
#include <unistd.h>

#include "parson/parson.h"
#include <greatest/greatest.h>
#include <parson/parson.h>

#include <featureflags.h>
#include <utils/serializer.h>
Expand Down
2 changes: 1 addition & 1 deletion scripts/audit-dependency-licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
curl https://raw.githubusercontent.com/bugsnag/license-audit/master/config/decision_files/global.yml -o decisions.yml

license_finder --enabled-package-managers=gradle --decisions-file=decisions.yml
license_finder --project-path=bugsnag-plugin-android-ndk/src/main/jni/deps/parson --enabled-package-managers=npm --decisions-file=decisions.yml
license_finder --project-path=bugsnag-plugin-android-ndk/src/test/cpp/parson --enabled-package-managers=npm --decisions-file=decisions.yml
Loading