Google Test
croc
Our great sponsors
Google Test | croc | |
---|---|---|
67 | 129 | |
33,091 | 26,297 | |
2.7% | - | |
8.3 | 8.3 | |
8 days ago | 20 days ago | |
C++ | Go | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Google Test
-
Creating k-NN with C++ (from Scratch)
cmake_minimum_required(VERSION 3.5) project(knn_cpp CXX) include(FetchContent) FetchContent_Declare( googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG release-1.11.0 ) FetchContent_MakeAvailable(googletest) FetchContent_Declare(matplotplusplus GIT_REPOSITORY https://github.com/alandefreitas/matplotplusplus GIT_TAG origin/master) FetchContent_GetProperties(matplotplusplus) if(NOT matplotplusplus_POPULATED) FetchContent_Populate(matplotplusplus) add_subdirectory(${matplotplusplus_SOURCE_DIR} ${matplotplusplus_BINARY_DIR} EXCLUDE_FROM_ALL) endif() function(knn_cpp_test TEST_NAME TEST_SOURCE) add_executable(${TEST_NAME} ${TEST_SOURCE}) target_link_libraries(${TEST_NAME} PUBLIC matplot) aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/../lib LIB_SOURCES) target_link_libraries(${TEST_NAME} PRIVATE gtest gtest_main gmock gmock_main) target_include_directories(${TEST_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../) target_sources(${TEST_NAME} PRIVATE ${LIB_SOURCES} ) include(GoogleTest) gtest_discover_tests(${TEST_NAME}) endfunction() knn_cpp_test(LinearAlgebraTest la_test.cc) knn_cpp_test(KnnTest knn_test.cc) knn_cpp_test(UtilsTest utils_test.cc)
-
Starting with C
Okay, time to start unit tests!!! We will use Unity Test Framework to do unit testing. It is one of widely used testing frameworks alongside with Check, Google Test etc. Just downloading source code, and putting it to the project folder is enough to make it work (that is also why it is portable).
-
Just in case: Debian Bookworm comes with a buggy GCC
Updating GCC (it happened to GoogleTest).
-
Automatically run tests, formatters & linters with CI!
Roy's project uses Google Test, a C++ testing framework. His testing setup is similar to mine as we both keep source files in one directory and tests in another. The key difference is that I can run the tests using the Visual Studios run button. It was fairly easy to write the new tests as there were existing ones that I could reference to check the syntax!
-
C++ Unit Testing Using Google Test - My Experience
The Google Test Documentation provides a primer for first-time users. The primer introduces some basic concepts and terminology, some of which I've been able to learn for this lab exercise.
-
Basic C++ Unit Testing with GTest, CMake, and Submodules
> git submodule add https://github.com/google/googletest.git > git submodule update --init --recursive
-
VS code + cmake + gtest?
cmake_minimum_required(VERSION 3.14) project(my_project) # GoogleTest requires at least C++14 set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) include(FetchContent) FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip ) # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) enable_testing() add_executable( hello_test hello_test.cpp ) target_link_libraries( hello_test GTest::gtest_main ) include(GoogleTest) gtest_discover_tests(hello_test)
-
FetchContent with Multiple URLs
FetchContent\_Declare(googletestGIT\_REPOSITORY [[email protected]](mailto:[email protected]):googletest.git [https://github.com/google/googletest.git](https://github.com/google/googletest.git)GIT\_TAG release-1.12.1)FetchContent\_MakeAvailable(googletest)
-
CI/CD pipelines for embedded
Not sure about CppUnit but I can speak to my previous experience using the googletest framework which compiles your tests to an executable, and since it's a very simple framework we were able to cross-compile and run directly on our device. We just had to hook up a device to the server that was running the CI so it could flash it when needed. That basically meant that our process was:
- Basic CMake question regarding subdirectories
croc
-
LocalSend: Open-source, cross-platform file sharing to nearby devices
This very hn entries is bust contradicting your statement.
Also what about syncthing[1] (for recurrent/permanent sync) and croc[2] (for one time copies) ?
I have used both for a number of years already.
[1] https://syncthing.net/
[2] https://github.com/schollz/croc
- How to copy a file between devices?
- Better way to transfer files between Windows <> Mac?
-
Ask HN: What are some unpopular technologies you wish people knew more about?
Check out croc, I've been using it for years, and it works pretty great too!
https://github.com/schollz/croc
-
CLI to browser P2P fileshare
I'm trying to find very specific software.I need CLI(!!!) tool like Croc to share files using P2P, but it's very inconvenient to ask people to install same software as me(Croc in this case). Instead i want to get direct download URL, so anyone can download it just by using browser.
-
Localsend: Open-Source Airdrop Alternative
Related projects:
- FlyingCarpet: direct transfer over local adhoc WIFI: https://github.com/spieglt/FlyingCarpet
- LANDrop: Drop any files to any devices on your LAN: https://github.com/LANDrop/LANDrop
- In-browser file transfer similar to Airdrop: https://snapdrop.net/
- Magic Wormhole: simple file transfer from computer-to-computer over the net: https://github.com/magic-wormhole/magic-wormhole
- Croc: similar to magic wormhole: https://github.com/schollz/croc
- Wormhole: user-friendly in-browser based e2e encrypted file transfer: https://wormhole.app/
-
Show HN: Aft, minimalistic file transferring program
There’s already the excellent [croc](https://github.com/schollz/croc) which I’ve gotten all my friends to install and use.
- FLaNK Stack for 25 September 2023
- Croc: Easily and securely send things from one computer to another
-
LANDrop – Drop any files to any devices on your LAN
croc works very well for this purpose: https://github.com/schollz/croc
What are some alternatives?
Catch - A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
magic-wormhole - get things from one computer to another, safely
Boost.Test - The reference C++ unit testing framework (TDD, xUnit, C++03/11/14/17)
syncthing - Open Source Continuous File Synchronization
CppUTest - CppUTest unit testing and mocking framework for C/C++
wormhole-gui - Cross-platform application for easy encrypted file, folder, and text sharing between devices. [Moved to: https://github.com/Jacalz/rymdport]
CppUnit - C++ port of JUnit
sharedrop - Easy P2P file transfer powered by WebRTC - inspired by Apple AirDrop
doctest - The fastest feature-rich C++11/14/17/20/23 single-header testing framework
snapdrop - A Progressive Web App for local file sharing
Unity Test API - Simple Unit Testing for C
termux-app - Termux - a terminal emulator application for Android OS extendible by variety of packages.