generatetestandbranch allows true fallthrough true true target nullptr false falthrough false false target null  and then we could call generatecomparetestandbranch with true target nullptr which is invalid this discrepancy seems to be at the api level  generatetestandbranch taking the true fallthrough argument and generatecomparetestandbranch not having such parameter 