diff --git a/.github/workflows/dart_test.yaml b/.github/workflows/dart_test.yaml index 80336c60..c7ba9f13 100644 --- a/.github/workflows/dart_test.yaml +++ b/.github/workflows/dart_test.yaml @@ -27,7 +27,7 @@ jobs: dart run opencv_dart:setup -p linux -a x64 - name: Run tests - run: flutter test + run: flutter test -x skip-workflow test_windows: runs-on: windows-latest diff --git a/lib/src/highgui/highgui.dart b/lib/src/highgui/highgui.dart index a5b49265..27f5994e 100644 --- a/lib/src/highgui/highgui.dart +++ b/lib/src/highgui/highgui.dart @@ -215,6 +215,11 @@ class Trackbar { int max; } +/// destroy all windows. +void destroyAllWindows() { + _bindings.destroyAllWindows(); +} + enum WindowFlag { /// the user can resize the window (no constraint) / also use to switch a fullscreen window to a normal size. WINDOW_NORMAL(0x00000000), diff --git a/test/highgui_test.dart b/test/highgui_test.dart index b5b6cabb..1a6571bd 100644 --- a/test/highgui_test.dart +++ b/test/highgui_test.dart @@ -1,3 +1,4 @@ +@Tags(['skip-workflow']) import 'package:test/test.dart'; import 'package:opencv_dart/opencv_dart.dart' as cv; @@ -14,7 +15,8 @@ void main() async { expect(win.isOpen, true); win.setWindowProperty(cv.WindowPropertyFlags.WND_PROP_FULLSCREEN, cv.WindowFlag.WINDOW_FULLSCREEN.value); - expect(win.getWindowProperty(cv.WindowPropertyFlags.WND_PROP_FULLSCREEN), cv.WindowFlag.WINDOW_FULLSCREEN.value); + expect(win.getWindowProperty(cv.WindowPropertyFlags.WND_PROP_FULLSCREEN), + cv.WindowFlag.WINDOW_FULLSCREEN.value); win.moveWindow(100, 100); win.resizeWindow(100, 100); @@ -56,7 +58,7 @@ void main() async { trackbar.maxPos = 15; // win.waitKey(1000); - + win.close(); }); }