Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-10-22Add unit tests for clamp_to_<int_t> functionskcgen
2022-10-14Add value and percentage parsing helperskcgen
2022-10-07Limit bit_views to 8-bit regs to avoid byte-order assumptionkcgen
This is deliberate because the byte-ordering of the bit-view's data cannot be assumed. For example, the byte ordering of a 16-bit register populated within a DOS emulator will be little-endian, even when running on a big-endian host, where as native data types on big-endian hardware will be big-endian.
2022-10-07Move the stubbed MSG_ functions into a dedicated libmisc depkcgen
This new "libmisc_stubs_dep" provides a stand-alone libmisc with all (other misc) functions supported, however without requiring even more DOSBox libs to satisfy all the symbols.
2022-10-03Change 'config -wc' to write UTF-8 fileFeralChild64
2022-09-10Update Copyright year on files modified this yearkcgen
2022-08-29Avoid archiving single objectskcgen
This cleanups a handful of "empty table" warnings generated by ranlib on macos.
2022-08-28Limit the integer distribution type to no smaller than 16-bitkcgen
When adding the random generator to the test cases, VisualStudio indicated that their random distribution type can only go down to 16-bit: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\random(1839,5): error C2338: note: char, signed char, unsigned char, char8_t, int8_t, and uint8_t are not allowed"
2022-08-28Let the random number generator support float valueskcgen
2022-08-25Add a bit-retention function, retain(), to bitopskcgen
2022-08-22Add a path-simplifying filesystem utility functionkcgen
2022-08-15Move most math stuff from support.h into math_utils.hJohn Novak
This is part of larger piece of work of getting rid of "kitchen sink" style utility/helper files.
2022-08-15Move most string util functions into string_utils.cpp from support.cppJohn Novak
2022-08-15Make 'cga_colors' accept 3 or 6-digit hex codes or decimal RGB-tripletsJohn Novak
Also, colors now need to be specified using 8-bit components (just like in CSS and HTML).
2022-08-08Move meson test to top-level and use in iir1kcgen
2022-08-06Standardize Meson formatting with muon fmtkcgen
2022-08-06Prioritize release builds using wrapskcgen
The majority of people building Staging want release builds without complications due to system libraries. This includes users on windows using MSYS2, Raspberry Pi users (via RetroPie), macOS users, and Linux users with OSes that might be very new or slightly out-of-date. Packagers can configure meson to use shared libraries and not fallback to wraps, and additionally ask to have specific libraries provided from the system using -Duse_system_libs=lib1,lib2, instead of wraps.
2022-07-30Avoid a buffer overrun when splitting 8.3 filenames (CWE-120)kcgen
Flagged by Coverity: The source buffer may be a string larger than the destination buffer, causing buffer overflow. In DOS_FCBOpen(unsigned short, unsigned short): Size of destination buffer is smaller than the size of the source buffer (CWE-120)
2022-07-28Provide Iir1 via Meson wrap and vcpkgkcgen
2022-07-25Completely remove the soft-limiterJohn Novak
2022-07-10Operate on unsigned bits in bitopskcgen
2022-07-06changes gmock_main lib name for debugLowLevelMahn
2022-06-30Add Tracy configuration to VS projectKirk Klobe
2022-06-24Add iround support function for floatskcgen
2022-06-22Add a value-accessor to bit_viewkcgen
2022-06-21Deprecate 'oplemu' config paramJohn Novak
2022-06-14Disable assembly outputshermp
Changed on the advice given by @LowLevelMahn
2022-06-14Enable VCPKG manifest modeshermp
2022-06-12Use a trivial copy constructor in bit_viewkcgen
2022-06-10Avoid shadowing a type inside the bit_view testskcgen
2022-06-10Add explicit handling for bools in bit_viewkcgen
2022-06-08Add an explicit copy constructor to bit_view and a couple more testskcgen
Fixes a warning from MSYS2 clang: warning: definition of implicit copy constructor is deprecated because it has a user-provided copy assignment operator [-Wdeprecated-copy-with-user-provided-copy]. In this case, we now provide a matching user-provide copy constructor to go along with the same type handled in the copy assignment operator.
2022-06-07Refactor BitField into "bit_view" and add unit-testskcgen
"bit_view" is a better description for how the class operates given it's a "view" of the bits held in the the underlying storage. This is meant to be similar to "string_view", which is also a similar "functional wrapper" around the underlying char* data. --- The author of the BitField class also describes it like this: Q. How do you ensure all the bitfields are usable? Because inherently, union will only use the max size member. You will not be able to see unique data for other members, if one is assigned a value, it will be the value for all other members. A. Remember that this isn't actually using bit-fields, but is emulating the effect of them. The "bits" are just a "view" into the underlying storage. Changing one is intended to be reflected in both. --- Other changes: - Use lower-case types and name similar to 'string_view', given there's nothing DOSBox-specific about it. This makes it feel more like "standard plumbing", and indeed, anyone can take this class into other projects - Add compile-time asserts to catch index and width issues - Make all functionality constexpr (compile-time evaluation) - Add unit tests for all functions - Fix decrement bug caught in unit tests - Fix comparison bugs caught in unit tests - Drop single-bit template specialization. A bit_view with a size of 1 is already known and optimized at compile-time now using "constexpr" - Remove the bool cast operators in favour of exact value operator, which are clearer to understand - Add member functions from bitops: - clear(): sets bits to zero - flip(): flip bits - none(): check if all bits are unset - any(): check if at least one bit is set - all(): check if all bits are set - Add comments - License as GPL v2+ (from public domain), given all lines have changed. Credit and thanks given to Evan Teran (thanks!)
2022-05-31Fix invalid ANSI erase codesshermp
2022-05-29Add ir1 to the build systemJohn Novak
2022-05-16Adjust copyright dates for 2022Patryk Obara
2022-05-16Convert few cpp files to Unix formatPatryk Obara
2022-04-14Mass replace int types with cstdint typesWengier
2022-04-01Copy the resources into VisualStudio's output areakcgen
Co-authored-by: kcgen <1557255+kcgen@users.noreply.github.com> Co-authored-by: shermp <14854761+shermp@users.noreply.github.com>
2022-03-30Explicitly exit DOSBox from the test fixturekcgen
2022-03-19Add unit tests for file name functionsWengier
2022-03-01Add more unit tests for WildFileCmpWengier
2022-03-01Rely on gmock dependency setting up gtestPatryk Obara
2022-02-18Revert "Assure gtest and gmock in the same version"kcgen
This reverts commit 15e106100fdf3a29c1e74ea0635f51164e4710b1.
2022-02-16Improve the bit operation set-to and mask-to orderingkcgen
2022-02-15Assure gtest and gmock in the same versionPatryk Obara
Prevent situation when one of these dependencies is pulled from OS repository and another one is pulled via Meson wrap. When gtest and gmock are incompatible, it might result in compilation issues, or even worse: false negative test results.
2022-02-02Add bit-operations helper functionskcgen
Bit operations can often be done in different ways: - one based bits? (not recommended, industy uses zero-based) - zero based bits? (recommended, but many unaware of this) - hex numbers? (common, but hard to read for multi-bits) - binary-literals? (gets massive and unreadable for larger bit depth: so then need to pick a different style leading to inconsistencies) - decimals? (confusion with counter and purpose) - on-the-fly conversion (1 << 4) (OK, but visually messy) this attempts to standardize these operations and also make the code more self-documenting. The functions are "const-correct", and all can be evaluated at compile-time when literals are used.
2022-02-02Add bit-operations helper functionskcgen
Bit operations can often be done in different ways: - one based bits? (not recommended, industy uses zero-based) - zero based bits? (recommended, but many unaware of this) - hex numbers? (common, but hard to read for multi-bits) - binary-literals? (gets massive and unreadable for larger bit depth: so then need to pick a different style leading to inconsistencies) - decimals? (confusion with counter and purpose) - on-the-fly conversion (1 << 4) (OK, but visually messy) this attempts to standardize these operations and also make the code more self-documenting. The functions are "const-correct", and all can be evaluated at compile-time when literals are used.
2022-02-01Add/cleanup units tests for redirectionsWengier
2022-02-01Add unit tests for shell redirectionsWengier