• Stars
    star
    328
  • Rank 128,352 (Top 3 %)
  • Language CMake
  • License
    BSD 3-Clause "New...
  • Created about 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unit test demo using Google Test.

Build Status Coverage Status License

gtest-demo

C/C++ unit test demo using Google Test with continuous integration provided by GitHub Actions and test coverage deployed to Coveralls.

How to build this demo

git clone https://github.com/bast/gtest-demo.git
cd gtest-demo
cmake -S. -Bbuild 
cmake --build build

Running the tests

Either using ctest:

$ cd build
$ ctest

Running tests...
Test project /home/user/gtest-demo/build
    Start 1: unit
1/1 Test #1: unit .............................   Passed    0.00 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.00 sec

Or directly using unit_tests:

$ cd build 
$ ./bin/unit_tests

[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from example
[ RUN      ] example.add
[       OK ] example.add (0 ms)
[ RUN      ] example.subtract
[       OK ] example.subtract (0 ms)
[----------] 2 tests from example (1 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (1 ms total)
[  PASSED  ] 2 tests.

Acknowledgments

More Repositories

1

somepackage

Show how to structure a Python project.
Python
396
star
2

cmake-example

Example project which demonstrates various CMake features.
CMake
141
star
3

pypi-howto

How to publish Python packages on PyPI.
72
star
4

cicero

🎤 Serving presentation slides written in Markdown.
JavaScript
55
star
5

gitink

ASCII to SVG Git log graph visualizer.
Python
31
star
6

pybind11-demo

Demonstrates how to call a C++ class from Python using pybind11.
C++
30
star
7

python-cffi-demo

Python CFFI demo: interfacing C++, Fortran, and Python.
Python
21
star
8

runtest

🎬 Numerically tolerant end-to-end test library for research software.
Python
19
star
9

pfunit-demo

Unit test demo using pFUnit.
CMake
17
star
10

hdf5-cmake-example

CMake HDF5 hello world example.
C++
16
star
11

apptainer-conda

Local Conda environments via Apptainer.
9
star
12

polygenerator

Generates random simple polygons.
Python
9
star
13

smeshing

Mesh generator for unstructured triangular grids.
Rust
9
star
14

til

💡 Today I Learned
Python
9
star
15

polygons

Fast points-in-polygon test and distances to polygons.
Rust
9
star
16

git-rebase-squash-exercise

Git rebase and commit squashing exercise.
Python
9
star
17

go-game

Go game for the browser.
JavaScript
8
star
18

fortran-collections

Got tired of Fortran not having high level containers.
Fortran
8
star
19

flanders

Fast 2D nearest neighbor search with an angle.
Rust
7
star
20

python-tdd-exercises

Python exercises in TDD style.
Python
7
star
21

git-bisect-exercise

Git bisect exercise.
Python
6
star
22

advent-of-code

My solutions to Advent of Code 🌲
Python
6
star
23

ascii2graph

Converts ASCII text to a graph (represented as a dictionary).
Python
6
star
24

obara-saika

Obara-Saika integral code sandbox.
Python
5
star
25

calculator

Exercise to practice building projects with CMake.
C++
5
star
26

balboa

Balboa computes Gaussian basis functions and their derivatives.
Python
5
star
27

numerov

Compute vibrational levels, wavefunctions, and expectation values using the Numerov-Cooley algorithm.
Python
4
star
28

software-development-toolbox

Scientific software development toolbox course material.
Python
4
star
29

refreeze

Markdown web slides served cold.
JavaScript
3
star
30

data-visualization

Data visualization course.
Jupyter Notebook
3
star
31

BasisSetConversionTools

Basis set conversion tools.
Visual Basic
3
star
32

interfacing-rust-python

Slides and material for "Interfacing Rust and Python"
CSS
2
star
33

language-mix

Examples across languanges.
Fortran
2
star
34

singularity-quarto

Singularity recipe for Quarto.
2
star
35

apptainer-venv

Fast Python virtual environments on Apptainer.
2
star
36

singularity-latex

Singularity recipe for LaTeX.
2
star
37

21cfortran

21st Century Fortran Tutorial.
Python
2
star
38

lorentzian

Convert x-y data to Lorentzians.
Python
2
star
39

freestyle

Convert fixed form Fortran files and header files to free form.
Python
2
star
40

fortran-callback

Fortran 90 callback example
Fortran
2
star
41

talk-complexity

Talk: Managing complexity and modular code development.
Fortran
2
star
42

cubicle

Utility to add/subtract/scale cube files.
Python
2
star
43

paragliding-aerodynamics

Collecting notes for teaching material.
Python
2
star
44

merge-polygons

Work on polygon merging tool/library.
1
star
45

recipes

Collection of cooking recipes.
1
star
46

dalton-meeting-2018

Slides presented at the Dalton meeting 2018.
1
star
47

bse-example

Experimenting with Basis Set Exchange.
Jupyter Notebook
1
star
48

bevy-demo

Bevy game example deployed via GitHub Pages.
Rust
1
star
49

singularity-pandoc

Singularity recipe for Pandoc.
1
star
50

experiment-jupyter

Jupyter Notebook
1
star
51

dirac-map

This is where DIRAC developers hang out.
1
star
52

iodoethane-project

Spin-spin couplings in iodoethane obtained with the DIRAC code.
Python
1
star
53

demo-git-conflict

Copy of https://github.com/ResearchSoftwareHour/demo-git-conflict which I will use during stream.
1
star
54

word-count

Python
1
star
55

cubicle-derv

Utility to calculate cube file derivatives.
Python
1
star
56

make-pipeline

Data processing pipeline example.
Python
1
star
57

talk-library-design

Talk: Library design the hard way.
1
star
58

pyngl-streamline

Script to generate colored streamline plots using PyNGL.
Python
1
star
59

fizz-buzz

Superseded by https://github.com/bast/calculator.
Fortran
1
star
60

talk-coding-like-1969

Talk: "Coding like it’s 1969 - research software engineering recipes for the next two decades"
CSS
1
star
61

bast.fr

Home Sweet Home.
HTML
1
star
62

dioxus-demo

Experimenting with Dioxus.
Rust
1
star
63

python-jupyter-demo

Material that I will use when demonstrating Jupyter with a brief introduction into Python.
Jupyter Notebook
1
star
64

angstrom-bohr

Angstrom to Bohr and Bohr to Angstrom conversion without commercials.
HTML
1
star
65

rhodeo

Density evaluation on a grid.
1
star
66

development-containers

Collection of my development containers
1
star
67

R-and-Python

Taking notes as I am learning R.
HTML
1
star
68

coastal-express

Compute nearest neighbor distances along the coast with a view angle.
Python
1
star
69

tromso-paragliding.xyz

Info about Tromso paragliding weather/areas for new/visiting pilots.
HTML
1
star
70

cprofile-howto

How to cProfile Python scripts written by others.
1
star
71

testing_doc_lesson

Python
1
star
72

cffi-mem-alloc-example

Demo of how to create or fix a memory leak when garbage collecting.
Python
1
star
73

err

Collection of recipes.
HTML
1
star
74

nixos-configuration

NixOS/ home manager setup.
Vim Script
1
star
75

talk-practical-software-licensing

Presentation slides: Practical software licensing.
CSS
1
star
76

space-invaders

Space Invaders.
JavaScript
1
star
77

bilinear

Bilinear interpolation library.
Rust
1
star
78

ekolu

Experimentation field. Later it will maybe morph into something real.
Rust
1
star
79

singularity-octopus

Singularity recipe for Octopus.
Roff
1
star
80

demo-aggregate-issues

Demonstrate how we could aggregate good first issues and urgent issues on one page.
Python
1
star
81

contain-R

Apptainer/Singularity container for reproducible R environments.
Shell
1
star
82

doc-example

This is just for demo. Please watch.
1
star
83

altair-geographic-plots

Examples of geographic plots with Vega-Altair.
Jupyter Notebook
1
star
84

history-window

Show command history "picture-in-picture" when teaching command line.
Shell
1
star