import * as assert from 'assert' ; import { FuncVersion , tryParseFuncVersion } from '../extension.bundle' ; suite ( 'tryParseFuncVersion' , ( ) => { const specificOne = '1.0.0' ; test ( specificOne , ( ) => { assert . equal ( tryParseFuncVersion ( specificOne ) , FuncVersion . v1 ) ; } ) ; const genericOne = '~1' ; test ( genericOne , ( ) => { assert . equal ( tryParseFuncVersion ( genericOne ) , FuncVersion . v1 ) ; } ) ; const specificTwo = '2.0.0' ; test ( specificTwo , ( ) => { assert . equal ( tryParseFuncVersion ( specificTwo ) , FuncVersion . v2 ) ; } ) ; const versionInCsprojFile = 'v2' ; test ( versionInCsprojFile , ( ) => { assert . equal ( tryParseFuncVersion ( versionInCsprojFile ) , FuncVersion . v2 ) ; } ) ; const genericTwo = '~2' ; test ( genericTwo , ( ) => { assert . equal ( tryParseFuncVersion ( genericTwo ) , FuncVersion . v2 ) ; } ) ; const specificThree = '3.0.0' ; test ( specificThree , ( ) => { assert . equal ( tryParseFuncVersion ( specificThree ) , FuncVersion . v3 ) ; } ) ; const prerelease = '3.0.0-alpha' ; test ( prerelease , ( ) => { assert . equal ( tryParseFuncVersion ( prerelease ) , FuncVersion . v3 ) ; } ) ; const genericThree = '~3' ; test ( genericThree , ( ) => { assert . equal ( tryParseFuncVersion ( genericThree ) , FuncVersion . v3 ) ; } ) ; const four = '~4' ; test ( four , ( ) => { assert . equal ( tryParseFuncVersion ( four ) , FuncVersion . v4 ) ; } ) ; const specific99 = '99.0.0' ; test ( specific99 , ( ) => { assert . equal ( tryParseFuncVersion ( specific99 ) , undefined ) ; } ) ; const generic99 = '~99' ; test ( generic99 , ( ) => { assert . equal ( tryParseFuncVersion ( generic99 ) , undefined ) ; } ) ; const beta = 'beta' ; test ( beta , ( ) => { assert . equal ( tryParseFuncVersion ( beta ) , undefined ) ; } ) ; const latest = 'latest' ; test ( latest , ( ) => { assert . equal ( tryParseFuncVersion ( latest ) , undefined ) ; } ) ; } ) ;