Skip to main content

Questions tagged [mocks]

In object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways. A programmer typically creates a mock object to test the behavior of some other object, in much the same way that a car designer uses a crash test dummy to simulate the dynamic behavior of a human in vehicle impacts.

4 votes
1 answer
167 views

Track and trace allocations

When testing or debugging allocator-aware objects, it can be useful to provide allocators that can provide insight into how they get called. The Tracing_alloc from ...
Toby Speight's user avatar
  • 77.3k
2 votes
0 answers
93 views

C++ Mock Library: Part 6

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Side Note: I will say the processes of ...
Loki Astari's user avatar
  • 95.4k
1 vote
0 answers
56 views

C++ Mock Library: Part 5

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Overview So brief overview: Part3 was the ...
Loki Astari's user avatar
  • 95.4k
3 votes
1 answer
81 views

C++ Mock Library: Part 4

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Description: In part 3 I described how I ...
Loki Astari's user avatar
  • 95.4k
2 votes
1 answer
61 views

C++ Mock Library: Part 3

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Define normal use case patterns: The next ...
Loki Astari's user avatar
  • 95.4k
3 votes
1 answer
124 views

C++ Mock Library: Part 2

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Removing redundant MOCK_SYS usage After ...
Loki Astari's user avatar
  • 95.4k
6 votes
1 answer
269 views

C++ Mock Library: Part 1

Parts C++ Mock Library: Part 1 C++ Mock Library: Part 2 C++ Mock Library: Part 3 C++ Mock Library: Part 4 C++ Mock Library: Part 5 C++ Mock Library: Part 6 Note: If you see an extra ...
Loki Astari's user avatar
  • 95.4k
3 votes
1 answer
134 views

End to End testing of user interaction in Rust

I am interested in any kind of possible improvement to this method of testing a Rust program with user interaction in an end-to-end manner (simulating user input and asserting a certain program output ...
Caridorc's user avatar
  • 27.5k
0 votes
1 answer
131 views

Unit testing and alternative to mocking in Haskell

Let's say you have a simple pure function that applies a discount of 30% if the total price of a list of Items is over 30.00 (let's not delve into the fact that I'm ...
Jir's user avatar
  • 201
2 votes
1 answer
542 views

Basic Ticket booking code with Unit tests

I am going to run a session for a few other developers who are new to Junit, mocking, etc. I have designed a very simple application with classes and tests to demonstrate how to do unit testing. ...
HariHaravelan's user avatar
0 votes
1 answer
94 views

First time writing tests (Service Layer)

Service class: ...
GodLike's user avatar
  • 51
3 votes
1 answer
133 views

Abstract wrapper for fundamental types

I have created this interface as part of my C++ learning path. This post inspired me a lot. The idea is to use its concrete implementations to perform some actions before and after any change of the ...
EmaPrn's user avatar
  • 31
1 vote
1 answer
85 views

How to make the initialization of the mocks more readable?

In an Arduino project, I'm using some code which is a slightly modified version of a public library. I made several modifications to it: I performed some minor changes I needed to make the code work. ...
Arseni Mourzenko's user avatar
2 votes
0 answers
90 views

A terminal based atom feed reader written in golang

I'm a beginner trying to get a better understanding of golang so I decided to write an atom feeder that runs from the terminal. I am using the gofeed library to parse the atom feeds and the tview ...
barryodev's user avatar
  • 121
2 votes
1 answer
322 views

Mockingbird c++ mocking framework

I have developed Mockingbird a mocking framework for c++, it depends on function injection, here is the code from the repository: ...
muaz's user avatar
  • 121

15 30 50 per page
1
2 3 4 5