Gabon coach Gernot Rohr was pleased with his team's overall performance in their 2-0 defeat by Brazil.
Goals from Sandro and Hernanes gave the five-time world champions the friendly win on Thursday in Libreville.
Gabon, 2012 Africa Cup of Nations co-hosts, used the match as a warm-up for January's tournament and their coach is happy over the performance.
"It was a good match for me because it a real test against one of the best teams in the world," Rohr said.
"To lose 2-0 against Brazil is okay for my team and I had good impression about some of the young players in my team," he told BBC Sport.
The hosts gave the former world champions a run for their money by creating a host of scoring chances but ultimately failing to respond to first half goals by Sandro and Hernanes.
Capitalising on hesitation in the Gabon defence after goalkeeper Didier Ovono had to push an awkward clearance on to the crossbar, Sandro opened the scoring in the 12th minute by pouncing on the rebound.
Hernanes doubled the lead 10 minutes before half time with a flying header after Ovono palmed a long-range shot from Jonas straight into the Lazio midfielder's path.
Defender Fabio was fortunate to escape unscathed from a studs-up tackle in the first half but did not appear again after the interval.
His replacement Alex Sandro was the victim of a two-footed lunge that brought strong protests from the Brazilian players.
The Sino-Gabonese Friendship Stadium in Libreville will host 12 February's African Cup of Nations final.
Gabon are co-hosting tournament with Equatorial Guinea.
Brazil were returning to Africa for the first time since elimination at the quarter-final stage of last year's World Cup.
They next play African champions Egypt in Doha, Qatar on Monday.