SVG Test Document
0 码力 | 5 页 | 11.74 KB | 5 月前3Back to Basics Unit Testing
{ assert( abs( 5) == 5 ); assert( abs(-5) == 5 ); } 1 2 3 4 5 6 7 "Code Under Test" (CUT) "System Under Test" (SUT) Part 0: Basics 7auto abs(int x) -> int { if (x >= 0) return -x; else return Basics 8Unit Test Frameworks Phil Nash Modern C++ Testing with Catch2 Catch2 https://github.com/catchorg/Catch2 Frameworks Part 0: Basics 9auto abs(int x) -> int; math.hpp math.cpp test_math.cpp #include #includetest_macros.hpp> #include "math.hpp" TEST_CASE("Absolute value tests"){ CHECK( abs( 5) == 5); CHECK( abs(-5) == 5); } 1 2 3 4 5 6 7 A test case tests one "thing" about 0 码力 | 109 页 | 4.13 MB | 5 月前3Testing Compile-time Constructs Within a Runtime Unit Testing Framework
testing is a must We use increasingly more compile-time polymorphism and checks Question: how to test if something is compilable in a rigorous way? We use C++ (14) for safety-critical applications return smth / T{2}; }© 2021 Apex.AI, Inc. Write a rigorous testing suite #includeTEST(TestMyApi, Halving) { EXPECT_FLOAT_EQ(21.0F, get_half_of(42.0F)); EXPECT_DOUBLE_EQ(21.0, get_half_of(42 get_half_of(42.0)); }© 2021 Apex.AI, Inc. Even leave a helpful comment #include TEST(TestMyApi, Halving) { EXPECT_FLOAT_EQ(21.0F, get_half_of(42.0F)); EXPECT_DOUBLE_EQ(21.0, get_half_of(42 0 码力 | 50 页 | 1.37 MB | 5 月前3Changing Legacy Code: With Confidence
you write an automated test, you need to make sure the code you are writing works.Test Everything on every feature Write Automated tests and run them continuously Test the change you just made tests and run them continuously Test the change you just made Testing StrategiesTest Everything on every feature Write Automated tests and run them continuously Test the change you just made Testing tests and run them continuously Test the change you just made Testing StrategiesTest Everything on every feature Write Automated tests and run them continuously Test the change you just made Testing0 码力 | 114 页 | 982.54 KB | 5 月前3Conan 2.5 Documentation
consumption. Conan client has a local cache for package storage, and so it allows you to fully create and test packages offline. You can also work offline as long as no new packages are needed from remote servers upgrade easier. 2.2 New graph model Conan 2 defines new requirement traits (headers, libs, build, run, test, package_id_mode, options, transitive_headers, transitive_libs) and package types (static, shared associated to recipes and packages. This feature can be very useful to manage build logs, tests executable, test results, coverage data and many other different files needed for traceability, compliance and business0 码力 | 769 页 | 4.70 MB | 1 年前3Conan 2.4 Documentation
consumption. Conan client has a local cache for package storage, and so it allows you to fully create and test packages offline. You can also work offline as long as no new packages are needed from remote servers upgrade easier. 2.2 New graph model Conan 2 defines new requirement traits (headers, libs, build, run, test, package_id_mode, options, transitive_headers, transitive_libs) and package types (static, shared associated to recipes and packages. This feature can be very useful to manage build logs, tests executable, test results, coverage data and many other different files needed for traceability, compliance and business0 码力 | 769 页 | 4.69 MB | 1 年前3Conan 2.3 Documentation
consumption. Conan client has a local cache for package storage, and so it allows you to fully create and test packages offline. You can also work offline as long as no new packages are needed from remote servers upgrade easier. 2.2 New graph model Conan 2 defines new requirement traits (headers, libs, build, run, test, package_id_mode, options, transitive_headers, transitive_libs) and package types (static, shared associated to recipes and packages. This feature can be very useful to manage build logs, tests executable, test results, coverage data and many other different files needed for traceability, compliance and business0 码力 | 748 页 | 4.65 MB | 1 年前3Scientific Unit Testing
CppCon 2015 Fedor Pikus, Back to Basics: Test-driven Development CppCon 2019 Kevlin Henney: "Structure and Interpretation of Test Cases" NDC Conferences 2019 "Test Smells and Fragrances" DevWeek 2014 run Fast to run TDD Deterministic Code coverage / regulatory requirement ... 3Unit Testing OO Code Test using only the public interface ("Black Box" testing) Forces better design ("design for testability") implementation Unit tests are also examples and documentation 4Object Oriented testing Let's unit test this class // Cup.h class Cup { public: Cup(); // creates an empty cup0 码力 | 45 页 | 1.91 MB | 5 月前3Conan 2.6 Documentation
consumption. Conan client has a local cache for package storage, and so it allows you to fully create and test packages offline. You can also work offline as long as no new packages are needed from remote servers upgrade easier. 2.2 New graph model Conan 2 defines new requirement traits (headers, libs, build, run, test, package_id_mode, options, transitive_headers, transitive_libs) and package types (static, shared associated to recipes and packages. This feature can be very useful to manage build logs, tests executable, test results, coverage data and many other different files needed for traceability, compliance and business0 码力 | 777 页 | 4.91 MB | 10 月前3Conan 2.10 Documentation
consumption. Conan client has a local cache for package storage, and so it allows you to fully create and test packages offline. You can also work offline as long as no new packages are needed from remote servers upgrade easier. 2.2 New graph model Conan 2 defines new requirement traits (headers, libs, build, run, test, package_id_mode, options, transitive_headers, transitive_libs) and package types (static, shared associated to recipes and packages. This feature can be very useful to manage build logs, tests executable, test results, coverage data and many other different files needed for traceability, compliance and business0 码力 | 803 页 | 5.02 MB | 10 月前3
共 215 条
- 1
- 2
- 3
- 4
- 5
- 6
- 22