Browse Source

moved examples and tests to root directory

tastytea 1 year ago
parent
commit
55ea84c27c
Signed by: tastytea <tastytea@tastytea.de> GPG Key ID: 59346E0EA35C67E5

+ 1
- 1
.gitignore View File

@@ -1,4 +1,4 @@
1 1
 /build/
2 2
 /doc/
3 3
 /update_gh-pages.sh
4
-/src/examples/example99*
4
+/examples/example99*

+ 2
- 2
CMakeLists.txt View File

@@ -70,7 +70,7 @@ endif()
70 70
 
71 71
 # Examples
72 72
 if(WITH_EXAMPLES)
73
-    file(GLOB sources_examples src/examples/*.cpp)
73
+    file(GLOB sources_examples examples/*.cpp)
74 74
     foreach(src ${sources_examples})
75 75
         get_filename_component(bin ${src} NAME_WE)
76 76
         add_executable(${bin} ${src})
@@ -81,7 +81,7 @@ endif()
81 81
 # Tests
82 82
 if(WITH_TESTS)
83 83
     include(CTest)
84
-    file(GLOB sources_tests src/tests/test_*.cpp)
84
+    file(GLOB sources_tests tests/test_*.cpp)
85 85
     foreach(src ${sources_tests})
86 86
         get_filename_component(bin ${src} NAME_WE)
87 87
         add_executable(${bin} ${src})

src/examples/example01_dump_json.cpp → examples/example01_dump_json.cpp View File


src/examples/example02_parse_account.cpp → examples/example02_parse_account.cpp View File


src/examples/example03_mastocron.cpp → examples/example03_mastocron.cpp View File


src/examples/example04_update_credentials.cpp → examples/example04_update_credentials.cpp View File


src/examples/example05_follow_unfollow.cpp → examples/example05_follow_unfollow.cpp View File


src/examples/example06_toot_delete-toot.cpp → examples/example06_toot_delete-toot.cpp View File


src/examples/example07_register_app.cpp → examples/example07_register_app.cpp View File


src/examples/example08_rate_limiting.cpp → examples/example08_rate_limiting.cpp View File


src/examples/example09_streaming_api.cpp → examples/example09_streaming_api.cpp View File


src/examples/example10_simplify.cpp → examples/example10_simplify.cpp View File


src/examples/example11_post_media.cpp → examples/example11_post_media.cpp View File


+ 1
- 1
packages/gentoo/mastodon-cpp-0.0.0.ebuild View File

@@ -44,7 +44,7 @@ src_install() {
44 44
 
45 45
     if use examples; then
46 46
         docinto examples
47
-        for file in src/examples/*.cpp; do
47
+        for file in examples/*.cpp; do
48 48
             dodoc ${file}
49 49
         done
50 50
     fi

+ 1
- 1
packages/gentoo/mastodon-cpp-9999.ebuild View File

@@ -52,7 +52,7 @@ src_install() {
52 52
 
53 53
     if use examples; then
54 54
         docinto examples
55
-        for file in src/examples/*.cpp; do
55
+        for file in examples/*.cpp; do
56 56
             dodoc ${file}
57 57
         done
58 58
     fi

src/tests/test_00_library_is_loadable.cpp → tests/test_00_library_is_loadable.cpp View File

@@ -1,7 +1,7 @@
1 1
 /*  This file is part of mastodon-cpp.
2 2
  */
3 3
 
4
-#include "../mastodon-cpp.hpp"
4
+#include "mastodon-cpp.hpp"
5 5
 
6 6
 int main(int argc, char *argv[])
7 7
 {

src/tests/test_01_get_instance.cpp → tests/test_01_get_instance.cpp View File

@@ -3,7 +3,7 @@
3 3
 
4 4
 #include <iostream>
5 5
 #include <cstdint>
6
-#include "../mastodon-cpp.hpp"
6
+#include "mastodon-cpp.hpp"
7 7
 
8 8
 int main(int argc, char *argv[])
9 9
 {

Loading…
Cancel
Save