jeudi 31 mars 2016

How to apply "for each" loop coverage testing?

I was wondering if "for" loop coverage can be applied to "for each" loops as well.. If so, how can it be done on the following code sample?

1. public static void foreachDisplay(int[] data){
  2. System.out.println("Display an array using for 
  3. each loop");
  4. for (int a  : data) {
    5. System.out.print(a+ " ");
    6. }
  7. }

Thank you.

Aucun commentaire:

Enregistrer un commentaire