Chi-squared tests for general composite hypotheses from censored samples