def METHOD_NAME():
    ''' Test the _validate_child method of ArrayOfStructuresMember. '''
    asmr = nodes.ArrayOfStructuresMember("regions")
    with pytest.raises(GenerationError) as err:
        asmr.addchild("wrong")
    assert ("'str' can't be child 0 of 'ArrayOfStructuresMember'" in
            str(err.value))
    asmr.addchild(nodes.Member("sub_mesh"))
    assert isinstance(asmr.children[0], nodes.Member)
    with pytest.raises(GenerationError) as err:
        asmr.addchild("2")
    assert ("'str' can't be child 1 of 'ArrayOfStructuresMember'" in
            str(err.value))
    idx = nodes.Reference(symbols.DataSymbol("idx", symbols.INTEGER_TYPE))
    asmr.addchild(idx)
    assert asmr.children[1] is idx