Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pdi.loose.code.PDILooseCode;
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- *
- * @author gonca
- */
- public class Testes {
- public static void main(String[] args) {
- int [][] m= {{1,2,3},{1,2,3},{1,2,3}};
- System.out.println("\n\nTESTES ASSOCIADOS AO MÉTODO testesomaMatriz() ");
- System.out.print("\nTESTAR soma de elemenros de é correta");
- System.out.println("..."+ testesomaMatriz (18, m));
- System.out.println("\n\nTESTES ASSOCIADOS AO MÉTODO testemediaMatriz() ");
- System.out.print("\nTESTAR media dos elementos de m é correta");
- System.out.println("..."+ testesomaMatriz (2, m));
- }
- /**
- *Teste do método verificaSeTemApelido
- * @param resp – resposta esperada
- * @param m
- * @return – SUCESSO ou FALHA consoante passou no teste ou falhou
- */
- public static String testesomaMatriz(int resp, int [][] m){
- if( PDILooseCode.somaMatriz(m)==resp) {
- return "SUCESSO";
- }
- return "FALHA";
- }
- /**
- *Teste do método verificaSeTemApelido
- * @param resp – resposta esperada
- * @param m
- * @return – SUCESSO ou FALHA consoante passou no teste ou falhou
- */
- public static String testemediaMatriz(int resp, int [][] m){
- if( PDILooseCode.somaMatriz(m)==resp) {
- return "SUCESSO";
- }
- return "FALHA";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement