Skip to content

Instantly share code, notes, and snippets.

@mmatrosov
mmatrosov / gist:8248a77d8b82623475e39dc84bdceba0
Created January 2, 2022 20:15
Catch2 output with gtest reporter on failing tests
[23:13:01] mmatrosov ~/dev/temp/Catch2/build (gtest-reporter)
$ ninja && projects/SelfTest -r gtest '*fail*'
Filters: *fail*
[==========] Running SelfTest
[----------] A METHOD_AS_TEST_CASE based test run that fails
[ RUN ] A METHOD_AS_TEST_CASE based test run that fails
../projects/SelfTest/UsageTests/Class.tests.cpp:32: FAILED:
REQUIRE( s == "world" )
with expansion:
"hello" == "world"
@mmatrosov
mmatrosov / output
Created January 2, 2022 20:01
Catch2 output with gtest reporter
[22:58:53] mmatrosov ~/dev/temp/Catch2/build (gtest-reporter)
$ ninja && projects/SelfTest -r gtest
[==========] Running SelfTest
[----------] Parse test names and tags
[ RUN ] Parse test names and tags
[ RUN ] Parse test names and tags / Empty test spec should have no filters
[ OK ] Parse test names and tags / Empty test spec should have no filters (0 ms)
[ RUN ] Parse test names and tags / Test spec from empty string should have no filters
[ OK ] Parse test names and tags / Test spec from empty string should have no filters (0 ms)
[ RUN ] Parse test names and tags / Test spec from just a comma should have no filters
@mmatrosov
mmatrosov / atomic_shared_ptr_benchmark.cpp
Last active June 3, 2021 13:08
folly::atomic_shared_ptr benchmark
#include <benchmark/benchmark.h>
#include <folly/concurrency/AtomicSharedPtr.h>
#include <shared_mutex>
#include <iostream>
struct Data {
int buffer[100];
};
@mmatrosov
mmatrosov / conanfile.py
Created November 2, 2017 16:35
google benchmark conan package
from conans import ConanFile, CMake, tools
class GooglebenchmarkConan(ConanFile):
name = "google-benchmark"
version = "1.2.0"
license = "<Put the package license here>"
url = "<Package recipe repository url here, for issues about the package>"
description = "<Description of Googlebenchmark here>"
settings = "os", "compiler", "build_type", "arch"
@mmatrosov
mmatrosov / daily-cpp-2017.txt
Last active June 21, 2017 15:51
Задачка для постоянных посетителей Повседневного С++
Дана последовательность чисел. Известно, что больше половины из них равны числу X.
Найти число X за один проход по последовательности и с наименьшим объёмом используемой памяти.
; Remaps are suspended by default
Suspend On
; Press CapsLock to toggle remaps
~CapsLock::
Suspend ; Mark this handler as not suspending
GetKeyState, state, CapsLock, T
if state = D
Suspend, Off