Visual assert
Author: g | 2025-04-24
Visual Assert download Visual Assert is a Visual Studio AddIn that allows you to easily write
Free visual assert Download - visual assert for Windows
Matrix typesAdded missing aligned matrix types to GTC_type_alignedAdded C++17 detectionAdded Visual C++ language standard version detectionAdded PDF manual build from markdownImprovements:Added a section to the manual for contributing to GLMRefactor manual, lists all configuration definesAdded missing vec1 based constructorsRedesigned constexpr support which excludes both SIMD and constexpr #783Added detection of Visual C++ 2017 toolsetsAdded identity functions #765Splitted headers into EXT extensions to improve compilation time #670Added separated performance testsClarified refract valid range of the indices of refraction, between -1 and 1 inclusively #806Fixes:Fixed SIMD detection on Clang and GCCFixed build problems due to printf and std::clock_t #778Fixed int modAnonymous unions require C++ language extensionsFixed ortho #790Fixed Visual C++ 2013 warnings in vector relational code #782Fixed ICC build errors with constexpr #704Fixed defaulted operator= and constructors #791Fixed invalid conversion from int scalar with vec4 constructor when using SSE instructionFixed infinite loop in random functions when using negative radius values using an assert #739. Visual Assert download Visual Assert is a Visual Studio AddIn that allows you to easily write functional tests to assert that all data is accurate, and they use the visual tests to assert that there are no visual bugs. While this is certainly a viable option, it is redundant. Not only is the visual check asserting that there are no visual bugs, but it is also asserting that everything on the page is correct, including the data. Back to home Visual Assert Beta 3 released Posted on 20 visual assert, c, tdd, unit testing, visual studio. A third beta release of Visual Assert is now available for download on Visual Assert Download. Downloading Visual Assert 1.0. Visual Assert is a Visual Studio AddIn that allows you to easily write, manage, run, and debug your C/C unit tests – without ever Explore how to work with assertions as a debugging tool for C, Visual Basic, or F managed code applications in Visual Studio. An assertion, or Assert statement, tests a condition, which Fix Microsoft Visual C Assertion Failed errorMicrosoft Visual C Assertion Failed errorHow to fix C assertion failed error in Windows 11Fix Microsoft Vi A third beta release of Visual Assert is now available for download on www.visualassert.com. Visual Assert, in case you have not tried it yet, is an Add-In for Visual Library usage examples can be seen at examples.py and run with:Other examples are also being added to test.py which can be run with:or to run just one example do:./test.py Test.test_simple_timescale_valuesBy default, data is parsed at once into a per-signal format that allows for efficient random access, for example as also viewable at ink:example_small.py[]:from vcdvcd import VCDVCD# Do the parsing.vcd = VCDVCD('counter_tb.vcd')# List all human readable signal names.print(vcd.references_to_ids.keys())# View all signal data.print(vcd.data)# Get a signal by human readable name.signal = vcd['counter_tb.top.out[1:0]']# tv is a list of Time/Value delta pairs for this signal.tv = signal.tvassert(tv[0] == (0, 'x'))assert(tv[1] == (2, '0'))assert(tv[2] == (6, '1'))assert(tv[3] == (8, '10'))assert(tv[4] == (10, '11'))assert(tv[5] == (12, '0'))# Random access value of the signal at a given time.# Note how it works for times between deltas as well.assert(signal[0] == 'x')assert(signal[1] == 'x')assert(signal[2] == '0')assert(signal[3] == '0')assert(signal[4] == '0')assert(signal[5] == '0')assert(signal[6] == '1')assert(signal[7] == '1')assert(signal[8] == '10')assert(signal[9] == '10')assert(signal[10] == '11')assert(signal[11] == '11')assert(signal[12] == '0')assert(signal[13] == '0')But you can also use this library in a purely stream callback fashion as shown in the examples by doing something like:class MyStreamParserCallbacks(vcdvcd.StreamParserCallbacks): def value( self, vcd, time, value, identifier_code, cur_sig_vals, ): print('{} {} {}'.format(time, value, identifier_code))vcd = VCDVCD('counter_tb.vcd', callbacks=MyStreamParserCallbacks(), store_tvs=False)store_tvs=False instructs the library to not store all the signal value change data, which would likely just take up useless space in your streaming application. Only signal metadata is stored in that case.Comments
Matrix typesAdded missing aligned matrix types to GTC_type_alignedAdded C++17 detectionAdded Visual C++ language standard version detectionAdded PDF manual build from markdownImprovements:Added a section to the manual for contributing to GLMRefactor manual, lists all configuration definesAdded missing vec1 based constructorsRedesigned constexpr support which excludes both SIMD and constexpr #783Added detection of Visual C++ 2017 toolsetsAdded identity functions #765Splitted headers into EXT extensions to improve compilation time #670Added separated performance testsClarified refract valid range of the indices of refraction, between -1 and 1 inclusively #806Fixes:Fixed SIMD detection on Clang and GCCFixed build problems due to printf and std::clock_t #778Fixed int modAnonymous unions require C++ language extensionsFixed ortho #790Fixed Visual C++ 2013 warnings in vector relational code #782Fixed ICC build errors with constexpr #704Fixed defaulted operator= and constructors #791Fixed invalid conversion from int scalar with vec4 constructor when using SSE instructionFixed infinite loop in random functions when using negative radius values using an assert #739
2025-04-19Library usage examples can be seen at examples.py and run with:Other examples are also being added to test.py which can be run with:or to run just one example do:./test.py Test.test_simple_timescale_valuesBy default, data is parsed at once into a per-signal format that allows for efficient random access, for example as also viewable at ink:example_small.py[]:from vcdvcd import VCDVCD# Do the parsing.vcd = VCDVCD('counter_tb.vcd')# List all human readable signal names.print(vcd.references_to_ids.keys())# View all signal data.print(vcd.data)# Get a signal by human readable name.signal = vcd['counter_tb.top.out[1:0]']# tv is a list of Time/Value delta pairs for this signal.tv = signal.tvassert(tv[0] == (0, 'x'))assert(tv[1] == (2, '0'))assert(tv[2] == (6, '1'))assert(tv[3] == (8, '10'))assert(tv[4] == (10, '11'))assert(tv[5] == (12, '0'))# Random access value of the signal at a given time.# Note how it works for times between deltas as well.assert(signal[0] == 'x')assert(signal[1] == 'x')assert(signal[2] == '0')assert(signal[3] == '0')assert(signal[4] == '0')assert(signal[5] == '0')assert(signal[6] == '1')assert(signal[7] == '1')assert(signal[8] == '10')assert(signal[9] == '10')assert(signal[10] == '11')assert(signal[11] == '11')assert(signal[12] == '0')assert(signal[13] == '0')But you can also use this library in a purely stream callback fashion as shown in the examples by doing something like:class MyStreamParserCallbacks(vcdvcd.StreamParserCallbacks): def value( self, vcd, time, value, identifier_code, cur_sig_vals, ): print('{} {} {}'.format(time, value, identifier_code))vcd = VCDVCD('counter_tb.vcd', callbacks=MyStreamParserCallbacks(), store_tvs=False)store_tvs=False instructs the library to not store all the signal value change data, which would likely just take up useless space in your streaming application. Only signal metadata is stored in that case.
2025-04-11Cppy3Embed Python 3 into your C++ app in 10 minutesMinimalistic library for embedding CPython 3.x scripting language into C++ applicationLightweight simple and clean alternative to heavy boost.python.No additional dependencies. Crossplatform -- Linux, Windows platforms are supported.cppy3 is sutable for embedding Python in C++ application while boost.python is evolved around extending Python with C++ module and it's embedding capabilities are somehow limited for now.FeaturesInject variables from C++ code into PythonExtract variables from Python to C++ layerReference-counted smart pointer wrapper for PyObject*Manage Python init/shutdown with 1 line of codeManage GIL with scoped lock/unlock guardsForward exceptions (throw in Python, catch in C++ layer)Nice C++ abstractions for Python native types list, dict and numpy.ndarraySupport Numpy ndarray via tiny C++ wrappersExample interactive python console in 10 lines of codeTested on Debian Linux x64 G++ and Mac OSX M1 ClangFeatures examples code snippets from tests.cppInject/extract variables C++ -> Python -> C++ Python -> C++" href="#injectextract-variables-c---python---c">("a", 2);cppy3::Main().injectVar("b", 2);cppy3::exec("assert a + b == 4");cppy3::exec("print('sum is', a + b)");// extractconst cppy3::Var sum = cppy3::eval("a + b");assert(sum.type() == cppy3::Var::LONG);assert(sum.toLong() == 4);assert(sum.toString() == L"4");">// create interpretercppy3::PythonVM instance;// injectcppy3::Main().injectVar("a", 2);cppy3::Main().injectVar("b", 2);cppy3::exec("assert a + b == 4");cppy3::exec("print('sum is', a + b)");// extractconst cppy3::Var sum = cppy3::eval("a + b");assert(sum.type() == cppy3::Var::LONG);assert(sum.toLong() == 4);assert(sum.toString() == L"4");Forward exceptions Python -> C++ C++" href="#forward-exceptions-python---c">"); assert(e.info.reason == L"test-exception"); assert(e.info.trace.size() > 0); assert(std::string(e.what()).size() > 0);}">// create interpretercppy3::PythonVM instance;try { // throw excepton in python cppy3::exec("raise Exception('test-exception')"); assert(false && "not supposed to be here");} catch (const cppy3::PythonException& e) { // catch in c++ assert(e.info.type == L""); assert(e.info.reason == L"test-exception"); assert(e.info.trace.size() > 0); assert(std::string(e.what()).size() > 0);}Support numpy ndarray a(cData, 2, 1);// wrap cData without copyingcppy3::NDArray b;b.wrap(data, 2, 1);REQUIRE(a(1, 0) == cData[1]);REQUIRE(b(1, 0) == cData[1]);// inject into python __main__ namespacecppy3::Main().inject("a", a);cppy3::Main().inject("b", b);cppy3::exec("import numpy");cppy3::exec("assert numpy.all(a == b), 'expect cData'");// modify b from python (b is a shared ndarray over cData)cppy3::exec("b[0] = 100500");assert(b(0, 0)
2025-03-27