mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
[PR #202] [MERGED] Fail Tests on QML Warnings #238
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/qmlnet/qmlnet/pull/202
Author: @shartte
Created: 5/23/2020
Status: ✅ Merged
Merged: 5/26/2020
Merged by: @pauldotknopf
Base:
develop← Head:fail-tests-on-qml-warnings📝 Commits (2)
e5a6952Fail Tests on QML Warnings44bea3cAdding note to circle back to this test at a later point.📊 Changes
4 files changed (+33 additions, -8 deletions)
View changed files
📝
src/native/QmlNet/QmlNet/qml/NetTestHelper.cpp(+12 -1)📝
src/net/Qml.Net.Tests/Qml/BaseQmlTests.cs(+3 -2)📝
src/net/Qml.Net.Tests/Qml/SignalTests.cs(+4 -2)📝
src/net/Qml.Net/Internal/Qml/NetTestHelper.cs(+14 -3)📄 Description
Runtime errors when running the QML parts of unit tests are currently ignored and not captured in test output. Warnings are now captured and if not explicitly disabled, any QML warning will fail the test and include the warning messages in the failure.
I came across this while writing tests for #201, since runtime failures were silently ignored, leading to a test assertion failure that was awfully hard to debug. With this change, such runtime errors (i.e. trying to access undefined properties) will now lead to an immediate test failure, and will include the proper messages.
What we would probably also want is to capture all QML warnings in the XUnit test output, but that would require us to pass through the ITestOutputHelper through all test constructors to the base class, which is a pain...
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.