@ -1,4 +1,4 @@
import { default as test } from "tape"
import { default as test } from "tape"
import * as common from '../../src/solidity-analyzer/modules/staticAnalysisCommon'
import * as common from '../../src/solidity-analyzer/modules/staticAnalysisCommon'
const { localCall , thisLocalCall , libCall , externalDirect , superLocal , assignment , abiNamespaceCallNodes ,
const { localCall , thisLocalCall , libCall , externalDirect , superLocal , assignment , abiNamespaceCallNodes ,
inlineAssembly , unaryOperation , nowAst , blockTimestamp , stateVariableContractNode ,
inlineAssembly , unaryOperation , nowAst , blockTimestamp , stateVariableContractNode ,
@ -6,7 +6,6 @@ const { localCall, thisLocalCall, libCall, externalDirect, superLocal, assignmen
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
lowlevelCall , parameterFunction , parameterFunctionCall , inheritance , blockHashAccess , contractDefinition , funcDefForComplexParams } = require ( './astBlocks' )
lowlevelCall , parameterFunction , parameterFunctionCall , inheritance , blockHashAccess , contractDefinition , funcDefForComplexParams } = require ( './astBlocks' )
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
const compiledContractObj = require ( './compilationDetails/CompiledContractObj.json' )
const compiledContractObj = require ( './compilationDetails/CompiledContractObj.json' )
function escapeRegExp ( str ) {
function escapeRegExp ( str ) {
@ -89,7 +88,7 @@ test('staticAnalysisCommon.helpers.operator', function (t) {
test ( 'staticAnalysisCommon.helpers.nodeType' , function ( t ) {
test ( 'staticAnalysisCommon.helpers.nodeType' , function ( t ) {
t . plan ( 3 )
t . plan ( 3 )
const node = { nodeType : 'Identifier' , name : 'now' }
const node = { nodeType : 'Identifier' , name : 'now' }
const node2 = { nodeType : 'FunctionCall' , memberName : 'call' }
const node2 = { nodeType : 'FunctionCall' , memberName : 'call' }
t . ok ( common . helpers . nodeType ( node , common . nodeTypes . IDENTIFIER ) , 'should work for identifier' )
t . ok ( common . helpers . nodeType ( node , common . nodeTypes . IDENTIFIER ) , 'should work for identifier' )