summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-10 12:08:19 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-10 12:08:19 +0200
commitf0a21e78764fd17747033b596b640bbcaf517f49 (patch)
tree564ef37556e9a0c351a5aea874a1e315e67d8d9b /examples
parent1c4bcb0ca012bebe7c7b9408aa85bb5b089e4619 (diff)
feat&fix: Reorganize library, and remove junk CMake files.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/cgi/cgi.cc4
-rw-r--r--examples/equiv/equiv.cc2
-rw-r--r--examples/must_pass/CMakeLists.txt12
-rw-r--r--examples/opt/CMakeLists.txt12
-rw-r--r--examples/opt/opt.cc (renamed from examples/must_pass/must_pass.cc)4
5 files changed, 17 insertions, 17 deletions
diff --git a/examples/cgi/cgi.cc b/examples/cgi/cgi.cc
index 5586410..d4a4f6a 100644
--- a/examples/cgi/cgi.cc
+++ b/examples/cgi/cgi.cc
@@ -4,7 +4,7 @@
licensed under the MIT license
*/
-#include <lib/cgi.hpp>
+#include <lib/utility/cgi.hpp>
#include <fstream>
#include <sstream>
#include <string>
@@ -73,7 +73,7 @@ int main(int argc, char** argv)
{
// ... let's assume we serve data.
- snu::web::cgi_writer writer;
+ snu::cgi::cgi_writer writer;
std::stringstream ss_file;
std::ifstream fp("index.html");
diff --git a/examples/equiv/equiv.cc b/examples/equiv/equiv.cc
index 326683e..896637d 100644
--- a/examples/equiv/equiv.cc
+++ b/examples/equiv/equiv.cc
@@ -4,7 +4,7 @@
licensed under the MIT license
*/
-#include <lib/equiv.hpp>
+#include <lib/logic/equiv.hpp>
#include <iostream>
/* finally test it */
diff --git a/examples/must_pass/CMakeLists.txt b/examples/must_pass/CMakeLists.txt
deleted file mode 100644
index 8ef683b..0000000
--- a/examples/must_pass/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-cmake_minimum_required(VERSION 3.15...3.31)
-
-project(
- MustPass
- VERSION 1.0
- LANGUAGES CXX)
-
-add_executable(MustPass must_pass.cc)
-
-set_property(TARGET MustPass PROPERTY CXX_STANDARD 20)
-target_include_directories(MustPass PUBLIC ../../)
diff --git a/examples/opt/CMakeLists.txt b/examples/opt/CMakeLists.txt
new file mode 100644
index 0000000..b63b1de
--- /dev/null
+++ b/examples/opt/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+cmake_minimum_required(VERSION 3.15...3.31)
+
+project(
+ Opt
+ VERSION 1.0
+ LANGUAGES CXX)
+
+add_executable(Opt opt.cc)
+
+set_property(TARGET Opt PROPERTY CXX_STANDARD 20)
+target_include_directories(Opt PUBLIC ../../)
diff --git a/examples/must_pass/must_pass.cc b/examples/opt/opt.cc
index dbe5bb4..a914d8d 100644
--- a/examples/must_pass/must_pass.cc
+++ b/examples/opt/opt.cc
@@ -4,7 +4,7 @@
licensed under the MIT license
*/
-#include <lib/opt.hpp>
+#include <lib/logic/opt.hpp>
#include <lib/io/print.hpp>
#include <string>
@@ -25,7 +25,7 @@ static auto do_some(const std::string recv_data, const std::string check_data)
const int hash_to_check = do_hash(check_data); /* here we assume this should match opt_hash */
const int opt_hash = do_hash(recv_data); /* we assume that the hash is correct */
- auto opt = snu::opt(snu::eval_eq(hash_to_check, opt_hash)); /* do the compute */
+ auto opt = snu::opt::opt(snu::opt::eval_eq(hash_to_check, opt_hash)); /* do the compute */
return opt;
}