14930cef6SMatthias Ringwald#!/usr/bin/env python3 24930cef6SMatthias Ringwald# 34930cef6SMatthias Ringwald# Copyright 2022 Google LLC 44930cef6SMatthias Ringwald# 54930cef6SMatthias Ringwald# Licensed under the Apache License, Version 2.0 (the "License"); 64930cef6SMatthias Ringwald# you may not use this file except in compliance with the License. 74930cef6SMatthias Ringwald# You may obtain a copy of the License at 84930cef6SMatthias Ringwald# 94930cef6SMatthias Ringwald# http://www.apache.org/licenses/LICENSE-2.0 104930cef6SMatthias Ringwald# 114930cef6SMatthias Ringwald# Unless required by applicable law or agreed to in writing, software 124930cef6SMatthias Ringwald# distributed under the License is distributed on an "AS IS" BASIS, 134930cef6SMatthias Ringwald# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 144930cef6SMatthias Ringwald# See the License for the specific language governing permissions and 154930cef6SMatthias Ringwald# limitations under the License. 164930cef6SMatthias Ringwald# 174930cef6SMatthias Ringwald 184930cef6SMatthias Ringwaldimport mdct, energy, bwdet, attdet 194930cef6SMatthias Ringwaldimport ltpf, sns, tns, spec, encoder, decoder 204930cef6SMatthias Ringwald 214930cef6SMatthias Ringwaldok = True 224930cef6SMatthias Ringwald 234930cef6SMatthias Ringwaldfor m in [ ( mdct , "MDCT" ), 244930cef6SMatthias Ringwald ( energy , "Energy Band" ), 254930cef6SMatthias Ringwald ( bwdet , "Bandwidth Detector" ), 264930cef6SMatthias Ringwald ( attdet , "Attack Detector" ), 274930cef6SMatthias Ringwald ( ltpf , "Long Term Postfilter" ), 284930cef6SMatthias Ringwald ( sns , "Spectral Noise Shaping" ), 294930cef6SMatthias Ringwald ( tns , "Temporal Noise Shaping" ), 304930cef6SMatthias Ringwald ( spec , "Spectral Quantization" ), 314930cef6SMatthias Ringwald ( encoder , "Encoder" ), 324930cef6SMatthias Ringwald ( decoder , "Decoder" ) ]: 334930cef6SMatthias Ringwald 344930cef6SMatthias Ringwald print('[{:^6}] {:}'.format('...', m[1]), end='\r', flush=True) 354930cef6SMatthias Ringwald ret = m[0].check() 364930cef6SMatthias Ringwald print('[{:^6}] {:}'.format('OK' if ret else 'FAILED', m[1])) 374930cef6SMatthias Ringwald 384930cef6SMatthias Ringwald ok = ok and ret 394930cef6SMatthias Ringwald 40*4c4eb519SMatthias Ringwaldexit(0 if ok else 1) 41