Skip to main content

Questions tagged [unit-testing]

Use this tag for code whose main focus is high-performance testing of the actual functional code.

Filter by
Sorted by
Tagged with
4 votes
3 answers
161 views

Function to calculate energy where all parameters must be positive

I have a function which requires all parameters to be positive: ...
Idieh's user avatar
  • 73
5 votes
1 answer
364 views

Trying Out DDD : How to enforce data integrity and immutability

I've been transitioning from type-safe programming languages like Dart and Java to Python, and I'm trying to enforce Domain-Driven Design (DDD) principles in a language that naturally leans towards ...
koussay issaoui's user avatar
4 votes
1 answer
146 views

Creating Dedicated Database for database test cases (Tests that I need to check the data are written or read sucessfully) in phpunit

I am making a base test class that bootstraps database Test cases ...
Dimitrios Desyllas's user avatar
2 votes
2 answers
141 views

C++20 Performance Test Code Generator

My previous question about a generic dictionary class for C++ raised some valid concerns. I have made some modifications based on the previous review, but it needs extensive testing and further ...
pacmaninbw's user avatar
  • 26k
6 votes
1 answer
438 views

FORTRAN90 test suite for Project Euler

The intent of this test file is to go through each of my Project Euler solutions and see if they: return the correct answer, and do so in under 60 seconds (unless expected otherwise). I am using ...
Olivia A's user avatar
3 votes
1 answer
140 views

Testing framework with a single assertion macro

I usually use the Catch2 testing framework in my C++ projects. Unlike other frameworks, it has only one core assertion macro for all comparisons. Instead of writing ...
elehtine's user avatar
  • 165
3 votes
1 answer
60 views

Swift: Mocking a REST API-request

I have read the last two days through several tutorials about how to mock a HTTP-request against a REST API. Finally I made a prototype for applying, what I have understood from the tutorials. Here's ...
michael.zech's user avatar
  • 4,972
1 vote
1 answer
111 views

Project for reading and printing IPs

It's a small project which consists of Ip class and functions for reading and printing IPs, unit tests for this code, and a driver app. The driver app is just ...
qloq's user avatar
  • 145
4 votes
0 answers
374 views

Fluent VBA: Two (Almost Three) Years Later

Part 1 - A fluent unit testing framework in VBA: A fluent unit testing framework in VBA Part 2 - Fluent VBA: One Year Later: Fluent VBA: One Year Later Two (almost three) years have now passed since I ...
Brian Gonzalez's user avatar
2 votes
0 answers
50 views

Testing PHP CodeIgniter 3 controller with PHPUnit

I want to unit test my PHP website, which uses the outdated framework CodeIgniter 3. CodeIgniter 3 uses the MVC pattern, and each page on the website corresponds to a public method in a controller. I ...
RedDragonWebDesign's user avatar
3 votes
1 answer
98 views

Build a dictionary from a string by the extraction of data from all the pairs <TAG|VAL> contained inside the string and clean string from TAGs

I have written code to manage a string and retrieve from it a dictionary which must contain pairs key-value dependent from the string. To be more clear I'll show ...
User051209's user avatar
1 vote
1 answer
86 views

Generic Min() for Integer Types (including Boolean)

This is a follow-up to Generic Max() for Integer Types (including Boolean) and An Attempt at Creating Generic Min()/Max() for Fundamental Types. What's new: MIN(), ...
Madagascar's user avatar
  • 10.1k
8 votes
2 answers
198 views

Generic Max() for Integer Types (including Boolean)

This is a follow-up to An Attempt at Creating Generic min()/max() for Fundamental Types. What's Changed: MIN() has been forsaken for the time being. Mixed types ...
Madagascar's user avatar
  • 10.1k
4 votes
3 answers
195 views

Stub-Based Unit Testing 5 Read Routines

Requirements: Following are the functions I need to test, along with the cases where they can fail: ...
Madagascar's user avatar
  • 10.1k
5 votes
1 answer
225 views

Unit Tests for an Arena Allocator

In my last post about the allocator, I received some comments about unit-tests: The code looks correct on the majority of the cases, I will suggest run valgrind or define a good set of unit tests ...
Madagascar's user avatar
  • 10.1k

15 30 50 per page
1
2 3 4 5
68