Git Product home page Git Product logo

au3unit's People

Contributors

genius257 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

au3unit's Issues

Circular folder reference results in endless loop

example: au3pm uses folder junctions to reference itself, from within installed packages.
Whilst circular folder references are a bad idea generally, au3unit should try and be able to prevent this.
Current use of the function "_FileListToArrayRec" is the cause.
A custom implementation of the function is needed, to detect and deal with junctions, symlinks & hardlinks.

assertTrue/assertFalse does not fail

assertTrue(False)
assertTrue(Null)
assertTrue("WRONG")
;No errors

This is caused because a mix of:

some matches methods (like Au3UnitConstraintIsTrue_Matches) returning a boolean instead of an Au3UnitExpectationFailedException

And:

If $returnResult Then Return ($comparisonFailure = Null) ? $success : SetError(1, 0, $matches)

Suggested fix:

If (IsBool($matches) And $matches) Or (Not IsBool($matches)) And $comparisonFailure = Null Then $success = True

Missing comparator for objects

Example code:

#include ".\au3pm\au3unit\Unit\assert.au3"
$a = ObjCreate("Scripting.Dictionary")
$b = ObjCreate("Scripting.Dictionary")
assertEquals($a, $b)

Output:

no comparator found!
1_assertEquals function is missing

This is also a problem when using objects in arrays.

scalar check fails for variable type Ptr

Func Au3ComparatorScalarComparator_isScalar($variable)
; https://www.php.net/manual/en/function.is-scalar.php
Return IsInt($variable) Or IsFloat($variable) Or IsString($variable) Or IsBool($variable)
EndFunc

This is expected, as PHP does not have general Ptr as a varaible type.
Expected fix is to add IsPtr to the condition checks, but testing is needed, to verify this gives expected behavior.

assertSame does not compare correctly

assertSame and by extent IsIdentical does not compare correctly.
$exspected == $other compares values as string representations. Furthermore var type also need to be verified.

'123' should not pass when matched against 123

Missing Paths

Your project references a path that isn't in the scope of this project, suggesting that:

  • AutoIt executable should be here: \au3pm\autoit\autoit3.exe
  • StringRegExpSplit.au3 should be here: ..\au3pm\StringRegExpSplit.au3

Also, some documentation would be awesome, because I'd love to start using this but don't know where to begin. Alternately, I'd be happy to work on documentation if you'd put a few examples in so I know where to start :D

Configuration file

Configuration file support is needed. Something like the phpunit.xml XML configuration file.
This would make it easy to pre-configure path, test file match filter and such.

assertCount

assertCount

I'm assuming it will be Ubound($array, 1), with some extra parameter to change the default dimension to assert?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.